Browse Source

bug修复

master
ljlong_2630 8 months ago
parent
commit
e6e56b1780
  1. 1
      src/views/eam/basic/fixedAssets/fixedAssets.data.ts
  2. 4
      src/views/eam/device/deviceMaintainPlan/index.vue
  3. 26
      src/views/eam/device/deviceRepair/deviceRepair.data.ts
  4. 7
      src/views/eam/device/deviceRepair/index.vue
  5. 24
      src/views/eam/device/deviceSpotInspectionRecordMain/index.vue
  6. 11
      src/views/eam/device/deviceinspectionjob/index.vue
  7. 8
      src/views/eam/device/devicemaintainjob/index.vue
  8. 28
      src/views/eam/device/devicemaintenancejob/index.vue
  9. 4
      src/views/eam/mold/moldMaintainPlan/index.vue
  10. 12
      src/views/eam/mold/moldRepair/moldRepair.data.ts
  11. 11
      src/views/eam/mold/moldinspectionjob/index.vue
  12. 11
      src/views/eam/mold/moldmaintainjob/index.vue
  13. 28
      src/views/eam/mold/moldmaintenancejob/index.vue
  14. 110
      src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

1
src/views/eam/basic/fixedAssets/fixedAssets.data.ts

@ -54,6 +54,7 @@ export const FixedAssets = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
table: { table: {
width: '150', width: '150',
fixed: 'left',
}, },
isSearch: true, isSearch: true,
isForm: false, isForm: false,

4
src/views/eam/device/deviceMaintainPlan/index.vue

@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:deviceMaintainPlan:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceMaintainPlan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceMaintainPlan:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceMaintainPlan:delete'}), //
] ]
// - // -

26
src/views/eam/device/deviceRepair/deviceRepair.data.ts

@ -4,6 +4,8 @@ import { selectAllFactoryArea } from '@/api/system/dept'
import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts' import * as DeviceAccountsApi from '@/api/eam/device/deviceAccounts'
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator' import { validateHanset,validateNumDot, validateEmail } from '@/utils/validator'
import * as UserApi from '@/api/system/user'
const userListAll = await UserApi.getSimpleUserList()
// 邮箱账号的列表 // 邮箱账号的列表
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
const deviceList = ref([]); const deviceList = ref([]);
@ -81,6 +83,29 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
}, },
} }
}, },
{
label: '报修人',
field: 'declarer',
sort: 'custom',
table: {
width: '150',
},
isForm: false,
isDetail: false,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname
},
search: {
component: 'Select',
componentProps: {
options: userListAll,
optionsAlias: {
labelField: 'nickname',
valueField: 'id'
},
},
},
},
{ {
label: '设备', label: '设备',
field: 'deviceNumber', field: 'deviceNumber',
@ -147,6 +172,7 @@ export const DeviceRepair = useCrudSchemas(reactive<CrudSchema[]>([
width: '150', width: '150',
}, },
}, },
{ {
label: '故障类型', label: '故障类型',
field: 'faultType', field: 'faultType',

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

@ -67,12 +67,16 @@ import * as DeviceRepairApi from '@/api/eam/device/deviceRepair'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts' import * as DeviceAccountApi from '@/api/eam/device/deviceAccounts'
import { DeviceAccounts } from '../deviceAccounts/deviceAccounts.data' import { DeviceAccounts } from '../deviceAccounts/deviceAccounts.data'
import { useUserStore } from '@/store/modules/user'
// import TableHead from '@/components/TableHead/src/TableHead.vue' // import TableHead from '@/components/TableHead/src/TableHead.vue'
// import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
// import Detail from '@/components/Detail/src/Detail.vue' // import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'DeviceRepair' }) defineOptions({ name: 'DeviceRepair' })
const userStore = useUserStore()
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -148,7 +152,8 @@ const butttondata = (row) => {
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceRepair:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceRepair:update'}), //
// defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:deviceRepair:delete' }), // // defaultButtons.mainListDeleteBtn({ hasPermi: 'eam:deviceRepair:delete' }), //
defaultButtons.backoutBtn({ hide: row.result != 'PENDING' }), //
defaultButtons.backoutBtn({ hide: !(row.result == 'PENDING' && row.declarer == userStore.getUser.id )}), //
] ]
} }

24
src/views/eam/device/deviceSpotInspectionRecordMain/index.vue

@ -223,7 +223,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), //
defaultButtons.acceptOrderBtn({ defaultButtons.acceptOrderBtn({
hide: !( hide: !(
row.status == 'PENDING' && row.status == 'PENDING' &&
@ -480,9 +480,25 @@ const detailSubmitForm= async (formType,data,getList,formRef,tableList) => {
} }
} }
const buttonControllFunction = (row, val) => { function buttonControllFunction(row, val) {
if (val == 'add') { if (val == 'delete') {
return false if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true
}
} else { } else {
return true return true
} }

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

@ -534,18 +534,21 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
callback() callback()
} }
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
return false if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false return false
} else { } else {
return true return true

8
src/views/eam/device/devicemaintainjob/index.vue

@ -501,7 +501,13 @@ function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
return false return false
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false return false
} else { } else {
return true return true

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

@ -104,6 +104,7 @@
@detailSubmitForm="detailSubmitForm" @detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
:openFormCallBack="openFormCallBack" :openFormCallBack="openFormCallBack"
:buttonControllFunction="buttonControllFunction"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -271,7 +272,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), //
defaultButtons.acceptOrderBtn({ defaultButtons.acceptOrderBtn({
hide: !( hide: !(
row.status == 'PENDING' row.status == 'PENDING'
@ -751,6 +752,31 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
} }
} }
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true
}
} else {
return true
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

4
src/views/eam/mold/moldMaintainPlan/index.vue

@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = [ const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'eam:moldMaintainPlan:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:moldMaintainPlan:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldMaintainPlan:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldMaintainPlan:delete'}), //
] ]
// - // -

12
src/views/eam/mold/moldRepair/moldRepair.data.ts

@ -33,7 +33,7 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
width: '150', width: '150',
fixed: 'left', fixed: 'left',
}, },
isSearch: true, isSearch: false,
isForm: false isForm: false
}, },
{ {
@ -100,6 +100,16 @@ export const MoldRepair = useCrudSchemas(reactive<CrudSchema[]>([
valueField: 'number' valueField: 'number'
}, },
}, },
},
search: {
component: 'Select',
componentProps: {
options: moldListNoPage,
optionsAlias: {
labelField: 'name',
valueField: 'number'
},
},
} }
}, },
{ {

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

@ -524,18 +524,21 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
callback() callback()
} }
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
return false if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false return false
} else { } else {
return true return true

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

@ -492,12 +492,17 @@ const detailSubmitForm= async (formType,data,getList1,formRef,tableList) => {
} }
} }
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
return false return false
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false return false
} else { } else {
return true return true

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

@ -104,6 +104,7 @@
@detailSubmitForm="detailSubmitForm" @detailSubmitForm="detailSubmitForm"
:isSearchTableItem="true" :isSearchTableItem="true"
:openFormCallBack="openFormCallBack" :openFormCallBack="openFormCallBack"
:buttonControllFunction="buttonControllFunction"
/> />
<!-- 导入 --> <!-- 导入 -->
@ -281,7 +282,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn(null), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), //
defaultButtons.acceptOrderBtn({ defaultButtons.acceptOrderBtn({
hide: !( hide: !(
row.status == 'PENDING' && row.status == 'PENDING' &&
@ -762,6 +763,31 @@ const submitFormSec = async (formType, data) => {
} }
function buttonControllFunction(row, val) {
if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) {
return false
} else {
return true
}
} else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') {
return false
} else {
return true
}
} else {
return true
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

110
src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts

@ -11,6 +11,7 @@ const userListAll = await UserApi.getSimpleUserList()
const userStore = useUserStore() const userStore = useUserStore()
const factoryList = await selectAllFactoryArea() const factoryList = await selectAllFactoryArea()
const moldList = await MoldAccountsApi.getMoldAccountsNoPage({}) const moldList = await MoldAccountsApi.getMoldAccountsNoPage({})
const moldAllList = await MoldAccountsApi.getMoldAccountsAllNoPage({})
const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 }) const userList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: 1 })
const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: null }) const dutyUserList = await selecUserByType({ classType: 'MOLD', factoryAreaNumber: '', flag: null })
const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD') const deviceTypeList = getStrDictOptions(DICT_TYPE.APP_DEVICE_MOLD_TYPE).filter(item => item.value == 'MOLD')
@ -50,105 +51,118 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
isForm: false, isForm: false,
isSearch: false, isSearch: false,
isTable: true, isTable: true,
isDetail: false,
}, },
{ {
label: '类型', label: '厂区',
field: 'type', field: 'factoryAreaNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: '150', width: '150',
}, },
api: () => factoryList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return deviceMoldTypeList.find((account) => account.value == cellValue)?.label return factoryList.find((account) => account.id == cellValue)?.name
}, },
isSearch: true,
search: { search: {
show: true,
component: 'Select', component: 'Select',
api: () => factoryList,
componentProps: { componentProps: {
options: deviceTypeList,
optionsAlias: { optionsAlias: {
labelField: 'label', labelField: 'name',
valueField: 'value' valueField: 'id'
}, }
}, }
}, },
form: { form: {
component: 'Select', component: 'Select',
api: () => factoryList,
componentProps: { componentProps: {
options: deviceTypeList, disabled: true,
optionsAlias: { optionsAlias: {
labelField: 'label', labelField: 'name',
valueField: 'value' valueField: 'id'
}, },
placeholder: "请选择设备" placeholder: "请先选择设备"
} },
}
},
{
label: '厂区',
field: 'factoryAreaNumberMO',
sort: 'custom',
table: {
width: '150',
}, },
isDetail: true,
isForm: false,
isTable: false,
isSearch: false,
}, },
{ {
label: '设备模具编号', label: '类型',
field: 'deviceNumber', field: 'type',
sort: 'custom', sort: 'custom',
table: { table: {
width: '150', width: '150',
}, },
api: () => moldList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return moldList.find((account) => account.number == cellValue)?.name return deviceMoldTypeList.find((account) => account.value == cellValue)?.label
}, },
isSearch: false,
search: { search: {
show: true, component: 'Select',
component: 'Input', componentProps: {
// api: () => moldList, options: deviceTypeList,
// componentProps: { optionsAlias: {
// optionsAlias: { labelField: 'label',
// labelField: 'name', valueField: 'value'
// valueField: 'number' },
// } },
// }
}, },
form: { form: {
component: 'Select', component: 'Select',
api: () => moldList,
componentProps: { componentProps: {
options: deviceTypeList,
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'label',
valueField: 'number' valueField: 'value'
}, },
}, placeholder: "请选择设备"
} }
},
}, },
{ {
label: '厂区编号', label: '设备模具',
field: 'factoryAreaNumber', field: 'deviceNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: '150', width: '150',
}, },
api: () => factoryList, isSearch: false,
api: () => moldAllList,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return factoryList.find((account) => account.id == cellValue)?.name return moldAllList.find((account) => account.number == cellValue)?.name
}, },
search: { search: {
show: true,
component: 'Select', component: 'Select',
api: () => factoryList, api: () => moldAllList,
componentProps: { componentProps: {
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'number'
} }
} }
}, },
form: { form: {
component: 'Select', component: 'Select',
api: () => factoryList, api: () => moldList,
componentProps: { componentProps: {
disabled: true,
optionsAlias: { optionsAlias: {
labelField: 'name', labelField: 'name',
valueField: 'id' valueField: 'number'
}, },
placeholder: "请先选择设备"
}, },
} }
}, },
@ -159,7 +173,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: '150', width: '150',
}, },
isSearch: true, isSearch: false,
api: () => userListAll, api: () => userListAll,
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
return userListAll.find((account) => account.id == cellValue)?.nickname return userListAll.find((account) => account.id == cellValue)?.nickname
@ -185,7 +199,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: '150', width: '150',
}, },
isSearch: false, isSearch: true,
dictType: DICT_TYPE.MAINTENANCE_SHIFT, dictType: DICT_TYPE.MAINTENANCE_SHIFT,
dictClass: 'number', dictClass: 'number',
form: { form: {
@ -199,7 +213,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([
table: { table: {
width: '150', width: '150',
}, },
isSearch: false, isSearch: true,
dictType: DICT_TYPE.FAULT_TYPE, dictType: DICT_TYPE.FAULT_TYPE,
dictClass: 'string', dictClass: 'string',
form: { form: {
@ -332,7 +346,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{ searchCondition: [{
key: 'number', key: 'number',
value: 'deviceNumber', value: 'deviceNumber',
message: '请选择设备模具编号!', message: '请选择设备模具!',
isMainValue: true isMainValue: true
}] }]
}, },
@ -349,7 +363,7 @@ export const MoldMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchCondition: [{ searchCondition: [{
key: 'number', key: 'number',
value: 'deviceNumber', value: 'deviceNumber',
message: '请选择设备模具编号!', message: '请选择设备模具!',
isMainValue: true isMainValue: true
}] }]
} }

Loading…
Cancel
Save