Browse Source

bug修复

master
ljlong_2630 5 months ago
parent
commit
f77ce0bdf7
  1. 6
      src/api/eam/basic/deviceMaintenance/index.ts
  2. 6
      src/api/eam/basic/moldMaintenance/index.ts
  3. 4
      src/components/TableForm/src/TableForm.vue
  4. 14
      src/views/eam/basic/deviceMaintenance/index.vue
  5. 14
      src/views/eam/basic/inspection/index.vue
  6. 14
      src/views/eam/basic/moldInspection/index.vue
  7. 2
      src/views/eam/basic/moldInspection/moldInspection.data.ts
  8. 14
      src/views/eam/basic/moldMaintenance/index.vue
  9. 2
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  10. 9
      src/views/eam/device/deviceRepair/index.vue
  11. 2
      src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts
  12. 30
      src/views/eam/device/deviceinspectionjob/index.vue
  13. 9
      src/views/eam/device/devicemaintenancejob/index.vue
  14. 9
      src/views/eam/device/techRepair/index.vue
  15. 9
      src/views/eam/device/techmaintenancejob/index.vue
  16. 9
      src/views/eam/mold/moldRepair/index.vue
  17. 31
      src/views/eam/mold/moldinspectionjob/index.vue
  18. 3
      src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts
  19. 9
      src/views/eam/mold/moldmaintenancejob/index.vue

6
src/api/eam/basic/deviceMaintenance/index.ts

@ -31,8 +31,14 @@ export const getDeviceMoldItems = async (id: number) => {
// 查询供应商发票申请主详情 // 查询供应商发票申请主详情
export const getNumber = async (params) => { export const getNumber = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/device-accounts/senior', data })
} else {
return await request.get({ url: `/eam/device-mold-items/getNumber`, params }) return await request.get({ url: `/eam/device-mold-items/getNumber`, params })
} }
}
// 新增项记录表(设备 模具 保养 维修 巡检点检) // 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {

6
src/api/eam/basic/moldMaintenance/index.ts

@ -31,8 +31,14 @@ export const getDeviceMoldItems = async (id: number) => {
// 查询供应商发票申请主详情 // 查询供应商发票申请主详情
export const getNumber = async (params) => { export const getNumber = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/eam/mold-accounts/senior', data })
} else {
return await request.get({ url: `/eam/device-mold-items/getNumber`, params}) return await request.get({ url: `/eam/device-mold-items/getNumber`, params})
} }
}
// 新增项记录表(设备 模具 保养 维修 巡检点检) // 新增项记录表(设备 模具 保养 维修 巡检点检)
export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => { export const createDeviceMoldItems = async (data: DeviceMoldItemsVO) => {

4
src/components/TableForm/src/TableForm.vue

@ -63,7 +63,7 @@
clearable clearable
:type="headerItem?.tableForm?.inputType" :type="headerItem?.tableForm?.inputType"
:placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label" :placeholder="headerItem?.tableForm?.placeholder || '请输入' + headerItem.label"
:disabled="headerItem?.tableForm?.disabled ? true: headerItem?.tableForm?.isInpuFocusShow ? true : false" :disabled="itemIsDisabled(headerItem, row)"
style="flex:1" style="flex:1"
/> />
<el-button v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button> <el-button v-if="headerItem?.tableForm?.isInpuFocusShow" @click="inpuFocus(headerItem,row,index)"><Icon icon="ep:search" size="14"/></el-button>
@ -381,7 +381,7 @@ const handleTableSelect = (row, column, event) => {
// item // item
const itemIsDisabled = (colum, row) => { const itemIsDisabled = (colum, row) => {
return Boolean(colum.tableForm?.disabled) || Boolean(row.disabled) || Boolean(row['disabled_' + colum.field]) return Boolean(colum.tableForm?.disabled) || colum?.tableForm?.isInpuFocusShow || Boolean(row.disabled) || Boolean(row['disabled_' + colum.field])
} }
// const { t } = useI18n() // // const { t } = useI18n() //

14
src/views/eam/basic/deviceMaintenance/index.vue

@ -291,6 +291,20 @@ const handleExport = async () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != "status"&&item.column != 'type')
const fixedField = [
{
action:"==",
column:"status",
value:"MAINTAIN",
},
{
action:"==",
column:"type",
value:"DEVICE",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

14
src/views/eam/basic/inspection/index.vue

@ -254,6 +254,20 @@ const handleExport = async () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != "status"&&item.column != 'type')
const fixedField = [
{
action:"==",
column:"status",
value:"INSPECTION",
},
{
action:"==",
column:"type",
value:"DEVICE",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

14
src/views/eam/basic/moldInspection/index.vue

@ -209,6 +209,20 @@ const handleExport = async () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != "status"&&item.column != 'type')
const fixedField = [
{
action:"==",
column:"status",
value:"INSPECTION",
},
{
action:"==",
column:"type",
value:"MOLD",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

2
src/views/eam/basic/moldInspection/moldInspection.data.ts

@ -1,6 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' import * as DeviceMoldItemsApi from '@/api/eam/basic/moldMaintenance'
// 表单校验 // 表单校验
export const DeviceMoldItemsRules = reactive({ export const DeviceMoldItemsRules = reactive({

14
src/views/eam/basic/moldMaintenance/index.vue

@ -284,6 +284,20 @@ const handleExport = async () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != "status"&&item.column != 'type')
const fixedField = [
{
action:"==",
column:"status",
value:"MAINTAIN",
},
{
action:"==",
column:"type",
value:"MOLD",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

2
src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts

@ -1,6 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' import * as DeviceMoldItemsApi from '@/api/eam/basic/moldMaintenance'
// 表单校验 // 表单校验
export const MoldMaintenanceRules = reactive({ export const MoldMaintenanceRules = reactive({

9
src/views/eam/device/deviceRepair/index.vue

@ -279,6 +279,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"DEVICE",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

2
src/views/eam/device/deviceinspectionjob/deviceInspectionMain.data.ts

@ -438,7 +438,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
initOptions: userList, initOptions: dutyUserList,
multiple: true, multiple: true,
collapseTags: true, collapseTags: true,
collapseTagsTooltip: true, collapseTagsTooltip: true,

30
src/views/eam/device/deviceinspectionjob/index.vue

@ -42,7 +42,7 @@
:apiUpdate="DeviceInspectionMainApi.updateDeviceInspectionMain" :apiUpdate="DeviceInspectionMainApi.updateDeviceInspectionMain"
:apiCreate="DeviceInspectionMainApi.createDeviceInspectionMain" :apiCreate="DeviceInspectionMainApi.createDeviceInspectionMain"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="true"
@onChange="onChange" @onChange="onChange"
:tableAllSchemas="DeviceInspectionDetail.allSchemas" :tableAllSchemas="DeviceInspectionDetail.allSchemas"
:tableFormRules="DeviceInspectionDetailRules" :tableFormRules="DeviceInspectionDetailRules"
@ -51,6 +51,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@submitForm="submitForm" @submitForm="submitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
@formSelectChange="formSelectChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -386,6 +387,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"DEVICE",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
@ -441,6 +451,24 @@ const onChange = (field, cur, item) => {
} }
} }
const formSelectChange = (field, cur, item) =>{
if (field == 'status') {
if (cur == '1') {
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'uncompleted').disabled = false
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'completionTime').disabled = true
item['completionTime']=''
DeviceInspectionDetailRules.uncompleted = [{ required: true, message: '该项为必填项' }]
DeviceInspectionDetailRules.completionTime = [{ required: false }]
} else {
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'uncompleted').disabled = true
DeviceInspectionDetail.allSchemas.tableFormColumns.find(item => item.field == 'completionTime').disabled = false
item['uncompleted']=''
DeviceInspectionDetailRules.uncompleted = [{ required: false }]
DeviceInspectionDetailRules.completionTime = [{ required: true , message: '该项为必填项'}]
}
}
}

9
src/views/eam/device/devicemaintenancejob/index.vue

@ -840,6 +840,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"DEVICE",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

9
src/views/eam/device/techRepair/index.vue

@ -279,6 +279,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"TECH",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

9
src/views/eam/device/techmaintenancejob/index.vue

@ -819,6 +819,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"TECH",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

9
src/views/eam/mold/moldRepair/index.vue

@ -254,6 +254,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"MOLD",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

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

@ -42,7 +42,7 @@
:apiUpdate="MoldInspectionMainApi.updateMoldInspectionMain" :apiUpdate="MoldInspectionMainApi.updateMoldInspectionMain"
:apiCreate="MoldInspectionMainApi.createMoldInspectionMain" :apiCreate="MoldInspectionMainApi.createMoldInspectionMain"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" :isBusiness="true"
@onChange="onChange" @onChange="onChange"
:tableAllSchemas="MoldInspectionDetail.allSchemas" :tableAllSchemas="MoldInspectionDetail.allSchemas"
:tableFormRules="MoldInspectionDetailRules" :tableFormRules="MoldInspectionDetailRules"
@ -51,6 +51,7 @@
@handleDeleteTable="handleDeleteTable" @handleDeleteTable="handleDeleteTable"
@submitForm="submitForm" @submitForm="submitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
@formSelectChange="formSelectChange"
/> />
<!-- 详情 --> <!-- 详情 -->
@ -389,6 +390,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"MOLD",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters
@ -671,6 +681,25 @@ const orderPrint = (row) => {
window.open(src.value + "&id=" + row.id) window.open(src.value + "&id=" + row.id)
} }
const formSelectChange = (field, cur, item) =>{
if (field == 'status') {
if (cur == '1') {
item['disabled_' + 'uncompleted'] = false
item['disabled_' + 'completionTime'] = true
item['completionTime']=''
MoldInspectionDetailRules.uncompleted = [{ required: true, message: '该项为必填项' }]
MoldInspectionDetailRules.completionTime = [{ required: false }]
} else {
item['disabled_' + 'uncompleted'] = true
item['disabled_' + 'completionTime'] = false
item['uncompleted']=''
MoldInspectionDetailRules.uncompleted = [{ required: false }]
MoldInspectionDetailRules.completionTime = [{ required: true , message: '该项为必填项'}]
}
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

@ -37,6 +37,9 @@ export const MoldInspectionMainRules = reactive({
status: [required], status: [required],
type: [required], type: [required],
faultType: [required], faultType: [required],
uncompleted: [
{ required: true, message: '该项为必填项', trigger: 'blur' }
],
}) })
export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ export const MoldInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([

9
src/views/eam/mold/moldmaintenancejob/index.vue

@ -603,6 +603,15 @@ const importSuccess = () => {
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
searchData.filters = searchData.filters.filter(item=>item.column != 'type')
const fixedField = [
{
action:"==",
column:"type",
value:"MOLD",
},
]
searchData.filters.push(...fixedField)
tableObject.params = { tableObject.params = {
isSearch: true, isSearch: true,
filters: searchData.filters filters: searchData.filters

Loading…
Cancel
Save