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: '是否可用',
field: 'available',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
isSearch: false,
isTable: true,
sort: 'custom',
table: {
width: 150
},
tableForm: {
type: 'Select',
inactiveValue: 'FALSE',
disabled: true
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
// {
// label: '是否可用',
// field: 'available',
// dictType: DICT_TYPE.TRUE_FALSE,
// dictClass: 'string',
// isSearch: false,
// isTable: true,
// sort: 'custom',
// table: {
// width: 150
// },
// tableForm: {
// type: 'Select',
// inactiveValue: 'FALSE',
// disabled: true
// },
// form: {
// component: 'Switch',
// value: 'TRUE',
// componentProps: {
// inactiveValue: 'FALSE',
// activeValue: 'TRUE'
// }
// }
// },
{
label: '创建时间',
field: 'createTime',

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

@ -142,12 +142,20 @@ const { tableObject, tableMethods } = useTable({
//
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 = [
// defaultButtons.defaultAddBtn({hasPermi:'eam:deviceInspectionMain:create'}), //
// 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.defaultAddBtn({ hide: !(judgeHasAddFunc()) }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -189,7 +197,7 @@ const butttondata = (row) => {
return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:deviceInspectionMain:update'}), //
// 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.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
]
@ -530,19 +538,19 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
function buttonControllFunction(row, val) {
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
} else {
return true
}
} 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
} else {
return true
}
} 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
} else {
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 () => {

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,
dictClass: 'string',
},
{
label: '接单人员',
field: 'maintenance',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
},
{
label: '接单时间',
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: '完成时间',
field: 'finishedTime',

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

@ -501,13 +501,13 @@ function buttonControllFunction(row, val) {
if (val == 'delete') {
return false
} 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
} else {
return true
}
} 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
} else {
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) {
if (field == 'status') {
if (cur == '1') {

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

@ -227,9 +227,22 @@ const { tableObject, tableMethods } = useTable({
//
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 = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc()) }), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
@ -272,7 +285,7 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
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({
hide: !(
row.status == 'PENDING'
@ -754,19 +767,19 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
function buttonControllFunction(row, val) {
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
} else {
return true
}
} 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
} else {
return true
}
} 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
} else {
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 () => {
getList()

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

@ -143,12 +143,22 @@ const { tableObject, tableMethods } = useTable({
//
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 = [
// defaultButtons.defaultAddBtn({hasPermi:'eam:moldInspectionMain:create'}), //
// defaultButtons.defaultImportBtn({hasPermi:'eam:moldInspectionMain:import'}), //
// defaultButtons.defaultExportBtn({ hasPermi: 'eam:moldInspectionMain:export' }), //
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc())}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
@ -187,7 +197,7 @@ const butttondata = (row) => {
return [
// defaultButtons.mainListEditBtn({hasPermi:'eam:moldInspectionMain:update'}), //
// 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.finishOrderBtn({ hide: !(row.status == 'PROCCED' && (userStore.getUser.id == row.maintenance)) }), //
]
@ -517,19 +527,19 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
function buttonControllFunction(row, val) {
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
} else {
return true
}
} 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
} else {
return true
}
} 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
} else {
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 () => {
getList()

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

@ -496,13 +496,13 @@ function buttonControllFunction(row, val) {
if (val == 'delete') {
return false
} 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
} else {
return true
}
} 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
} else {
return true
@ -552,6 +552,18 @@ const openFormCallBack = (type, row, masterParmas, callback) => {
}
callback()
}
function isReceiver(orderPerson) {
if (orderPerson == userStore?.getUser?.id) {
return true
} else {
return false
}
}
/** 初始化 **/
onMounted(async () => {
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,
dictClass: 'string',
},
{
label: '接单人员',
field: 'maintenance',
sort: 'custom',
isSearch: false,
table: {
width: '150',
},
},
{
label: '接单时间',
field: 'receiveTime',

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

@ -230,14 +230,31 @@ const { tableObject, tableMethods } = useTable({
//
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 = [
defaultButtons.defaultAddBtn(null), //
defaultButtons.defaultAddBtn({ hide: !(judgeHasAddFunc())}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null) //
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') {
@ -282,7 +299,7 @@ const isShowMainButton = (row, val) => {
// -
const butttondata = (row) => {
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({
hide: !(
row.status == 'PENDING' &&
@ -720,7 +737,7 @@ const onChangeSec = (field, cur, item,formRefSec) => {
}
if (field == 'factoryAreaNumber') {
selecUserByType({ classType: 'DEVICE', factoryAreaNumber: cur, flag: null }).then(res => {
selecUserByType({ classType: 'MOLD', factoryAreaNumber: cur, flag: null }).then(res => {
repairUser.value = res
const setV = {}
setV['maintenance'] = ''
@ -765,19 +782,19 @@ const submitFormSec = async (formType, data) => {
function buttonControllFunction(row, val) {
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
} else {
return true
}
} 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
} else {
return true
}
} 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
} else {
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 () => {

Loading…
Cancel
Save