Browse Source

保养和检修工单打印功能补充

master
ljlong_2630 7 months ago
parent
commit
a896211bbd
  1. 13
      src/views/eam/mold/moldinspectionjob/index.vue
  2. 2
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  3. 11
      src/views/eam/mold/moldmaintainjob/index.vue
  4. 2
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

13
src/views/eam/mold/moldinspectionjob/index.vue

@ -123,6 +123,7 @@ import * as DeviceInspectionDetailApi from '@/api/eam/device/deviceInspectionDet
import * as DeviceInspectionMainApi from '@/api/eam/device/deviceInspectionMain'
import * as MoldAccountsApi from '@/api/eam/mold/moldAccounts'
import * as MoldMaintenanceMainApi from '@/api/eam/mold/moldMaintenanceMain'
import { getAccessToken } from '@/utils/auth'
import {
MoldMaintenanceMain,
MoldMaintenanceMainRules,
@ -153,6 +154,8 @@ const verifyFormValue = ref({
verifyContent: '',
})
const openRowValue = ref()
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/941184370359353344?token=' + getAccessToken())
//
const searchTableSuccess = (formField, searchField, val, formRef, type, row) => {
nextTick(() => {
@ -247,6 +250,9 @@ const butttondata = (row) => {
defaultButtons.verifyOrderBtn({
hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row))
}), //
defaultButtons.orderPrintBtn({
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row))
}) //
]
}
@ -260,6 +266,8 @@ const buttonTableClick = async (val, row) => {
handleFinishOrder(row)
} else if (val == 'verifyOrder') { //
verifyOrder(row)
} else if (val == 'orderPrint') {
orderPrint(row)
}
}
@ -669,6 +677,11 @@ const judgeIsTheClassEngineer = (row) => {
}
}
const orderPrint = (row) => {
window.open(src.value + "&id=" + row.id)
}
/** 初始化 **/
onMounted(async () => {
getList()

2
src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts

@ -363,7 +363,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 200,
fixed: 'right'
},
isDetail:false

11
src/views/eam/mold/moldmaintainjob/index.vue

@ -141,6 +141,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { useUserStore } from '@/store/modules/user'
import { selectAllFactoryArea } from '@/api/system/dept'
import * as UserApi from '@/api/system/user'
import { getAccessToken } from '@/utils/auth'
defineOptions({ name: 'MoldMaintainOrderMain' })
const message = useMessage() //
@ -159,6 +160,8 @@ const updateFormValue = ref({
})
const dialogVisible = ref(false)
const dialogRowData = ref()
const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL
const src = ref(BASE_URL + '/jmreport/view/940395429096013824?token=' + getAccessToken())
//
const updataTableColumns = (val) => {
tableColumns.value = val
@ -272,6 +275,9 @@ const butttondata = (row) => {
defaultButtons.verifyOrderBtn({
hide: !(row.status == 'COMPLETED' && judgeIsTheClassEngineer(row))
}), //
defaultButtons.orderPrintBtn({
hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) || !((row.status == 'COMPLETED' || row.status == 'PECEIVED') && judgeIsTheClassEngineer(row))
}) //
]
}
const onChange = (field, cur, item) => {
@ -303,6 +309,8 @@ const buttonTableClick = async (val, row) => {
openDialog(row)
} else if (val == 'finishOrder') {
finishOrder(row)
} else if (val == 'orderPrint') {
orderPrint(row)
}
}
@ -649,6 +657,9 @@ const onSubmit = (val) => {
getList()
}
const orderPrint = (row) => {
window.open(src.value + "&id=" + row.id)
}
/** 初始化 **/
onMounted(async () => {

2
src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts

@ -289,7 +289,7 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'action',
isForm: false,
table: {
width: 150,
width: 200,
fixed: 'right'
},
isDetail: false,

Loading…
Cancel
Save