Browse Source

解决测试bug,解决冲突

master
ljlong_2630 8 months ago
parent
commit
168862a6a0
  1. 50
      src/views/eam/basic/item/item.data.ts
  2. 32
      src/views/eam/device/deviceinspectionjob/index.vue
  3. 22
      src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts
  4. 12
      src/views/eam/device/devicemaintainjob/index.vue
  5. 32
      src/views/eam/device/devicemaintenancejob/index.vue
  6. 34
      src/views/eam/mold/moldinspectionjob/index.vue
  7. 16
      src/views/eam/mold/moldmaintainjob/index.vue
  8. 9
      src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts
  9. 36
      src/views/eam/mold/moldmaintenancejob/index.vue

50
src/views/eam/basic/item/item.data.ts

@ -219,31 +219,31 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

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

@ -142,12 +142,20 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const judgeHasAddFunc = () => {
const rolesOk = userStore.roles.find(item => {
return item == 'device_class_worker_role' || item == 'device_class_Engineer_role' || item == 'tech_class_worker_role' || item == 'tech_class_Engineer_role'
})
if (rolesOk != undefined && rolesOk != null && rolesOk.length > 0) {
return true
} else {
return false
}
}
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'eam:deviceInspectionMain:create'}), // defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc()) }), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:deviceInspectionMain:import'}), //
// defaultButtons.defaultExportBtn({ hasPermi: 'eam:deviceInspectionMain:export' }), //
defaultButtons.defaultAddBtn({ hide: !(userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker') || userStore?.userSelfInfo?.posts?.some((item) => item.code == 'engineer')) }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -189,7 +197,7 @@ const butttondata = (row) => {
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:deviceInspectionMain:delete'}), //
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance))}), //
defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
] ]
@ -530,19 +538,19 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
} }
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
@ -552,6 +560,14 @@ function buttonControllFunction(row, val) {
} }
} }
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

22
src/views/eam/device/devicemaintainjob/deviceMaintainOrderMain.data.ts

@ -142,6 +142,15 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
dictClass: 'string', dictClass: 'string',
}, },
{
label: '接单人员',
field: 'maintenance',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
},
{ {
label: '接单时间', label: '接单时间',
field: 'receiveTime', field: 'receiveTime',
@ -159,19 +168,6 @@ export const DeviceMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{
label: '接单人员',
field: 'maintenance',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
form: {
component: 'InputNumber',
value: 0
},
},
{ {
label: '完成时间', label: '完成时间',
field: 'finishedTime', field: 'finishedTime',

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

@ -501,13 +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' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
@ -517,6 +517,14 @@ function buttonControllFunction(row, val) {
} }
} }
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
function detailOnChange(field, cur, item,formRef) { function detailOnChange(field, cur, item,formRef) {
if (field == 'status') { if (field == 'status') {
if (cur == '1') { if (cur == '1') {

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

@ -227,9 +227,22 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const judgeHasAddFunc = () => {
const rolesOk = userStore.roles.find(item => {
return item == 'device_class_worker_role' || item == 'device_class_Engineer_role' || item == 'tech_class_worker_role' || item == 'tech_class_Engineer_role'
})
if (rolesOk != undefined && rolesOk != null && rolesOk.length > 0) {
return true
} else {
return false
}
}
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc()) }), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
@ -272,7 +285,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance) )}), //
defaultButtons.acceptOrderBtn({ defaultButtons.acceptOrderBtn({
hide: !( hide: !(
row.status == 'PENDING' row.status == 'PENDING'
@ -754,19 +767,19 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) {
return false return false
} else { } else {
return true return true
} }
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) {
return false return false
} else { } else {
return true return true
@ -777,6 +790,15 @@ function buttonControllFunction(row, val) {
} }
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

@ -143,12 +143,22 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const judgeHasAddFunc = () => {
const rolesOk = userStore.roles.find(item => {
return item == 'mold_class_worker_role' || item == 'mold_class_worker_role'
})
if (rolesOk != undefined && rolesOk != null && rolesOk.length > 0) {
return true
} else {
return false
}
}
// //
const HeadButttondata = [ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'eam:moldInspectionMain:create'}), // defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc())}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:moldInspectionMain:import'}), //
// defaultButtons.defaultExportBtn({ hasPermi: 'eam:moldInspectionMain:export' }), //
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), // defaultButtons.defaultSetBtn(null), //
@ -187,7 +197,7 @@ const butttondata = (row) => {
return [ return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), // // defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldInspectionMain:delete'}), // // defaultButtons.mainListDeleteBtn({hasPermi:'eam:moldInspectionMain:delete'}), //
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED' && isReceiver(row.maintenance))}), //
defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.mainInspectionOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), // defaultButtons.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
] ]
@ -517,19 +527,19 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
} }
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
@ -539,6 +549,14 @@ function buttonControllFunction(row, val) {
} }
} }
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

@ -496,13 +496,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' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
@ -552,6 +552,18 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
} }
callback() callback()
} }
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

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

@ -134,6 +134,15 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive<CrudSchema[]>([
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictType: DICT_TYPE.DEVICE_MOLD_TYPE,
dictClass: 'string', dictClass: 'string',
}, },
{
label: '接单人员',
field: 'maintenance',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
},
{ {
label: '接单时间', label: '接单时间',
field: 'receiveTime', field: 'receiveTime',

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

@ -230,14 +230,31 @@ const { tableObject, tableMethods } = useTable({
// //
const { getList, setSearchParams } = tableMethods const { getList, setSearchParams } = tableMethods
const judgeHasAddFunc = () => {
const rolesOk = userStore.roles.find(item => {
return item == 'mold_class_worker_role' || item == 'mold_class_worker_role'
})
if (rolesOk != undefined && rolesOk != null && rolesOk.length > 0) {
return true
} else {
return false
}
}
// //
const HeadButttondata = [ const HeadButttondata = [
defaultButtons.defaultAddBtn(null), // defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc())}), //
defaultButtons.defaultFreshBtn(null), // defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) // defaultButtons.defaultSetBtn(null) //
] ]
// //
const buttonBaseClick = (val, item) => { const buttonBaseClick = (val, item) => {
if (val == 'add') { if (val == 'add') {
@ -282,7 +299,7 @@ const isShowMainButton = (row, val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED')}), // defaultButtons.mainListEditBtn({ hide: !(row.status != 'COMPLETED' && row.status != 'VERIFIED' && row.status != 'REJECTED') && isReceiver(row.maintenance)}), //
defaultButtons.acceptOrderBtn({ defaultButtons.acceptOrderBtn({
hide: !( hide: !(
row.status == 'PENDING' && row.status == 'PENDING' &&
@ -720,7 +737,7 @@ const onChangeSec = (field, cur, item,formRefSec) => {
} }
if (field == 'factoryAreaNumber') { if (field == 'factoryAreaNumber') {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: cur, flag: null }).then(res => { selecUserByType({ classType: 'MOLD', factoryAreaNumber: cur, flag: null }).then(res => {
repairUser.value = res repairUser.value = res
const setV = {} const setV = {}
setV['maintenance'] = '' setV['maintenance'] = ''
@ -765,19 +782,19 @@ const submitFormSec = async (formType, data) => {
function buttonControllFunction(row, val) { function buttonControllFunction(row, val) {
if (val == 'delete') { if (val == 'delete') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
} }
} else if (val == 'edit') { } else if (val == 'edit') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' ) { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance) ) {
return false return false
} else { } else {
return true return true
} }
} else if(val == 'add') { } else if(val == 'add') {
if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED') { if (row.status == 'COMPLETED' || row.status == 'VERIFIED' || row.status == 'REJECTED' || !isReceiver(row.maintenance)) {
return false return false
} else { } else {
return true return true
@ -788,6 +805,13 @@ function buttonControllFunction(row, val) {
} }
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {

Loading…
Cancel
Save