Browse Source

离线登记,返线登记,增加状态,增加按钮权限

master_hella_20240701
TengXF 5 months ago
parent
commit
b0fd2b93e7
  1. 3
      src/utils/dict.ts
  2. 20
      src/views/mes/productBackline/index.vue
  3. 8
      src/views/mes/productBackline/productBackline.data.ts
  4. 20
      src/views/mes/productOffline/index.vue
  5. 8
      src/views/mes/productOffline/productOffline.data.ts
  6. 1
      src/views/mes/reworkBatch/reworkBatch.data.ts

3
src/utils/dict.ts

@ -354,5 +354,6 @@ export enum DICT_TYPE {
REPAIR_LEVEL = 'repair_level', //维修级别 REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成 IS_COMPLETED = 'is_completed', //是否完成
MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期 MAINTENANCE_CYCLE ='maintenance_cycle', // 保养周期
EAM_ORDER_STATUS = 'eam_order_status' EAM_ORDER_STATUS = 'eam_order_status',
OFF_BACK_STATUS = 'off_back_status'
} }

20
src/views/mes/productBackline/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -138,10 +138,20 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = [ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'mes:product-backline:update'}), // return [
defaultButtons.mainListDeleteBtn({hasPermi:'mes:product-backline:delete'}), // defaultButtons.mainListEditBtn({hide: isShowMainButton(row,['1']),hasPermi:'mes:reworkSingle:update'}), //
] defaultButtons.mainListDeleteBtn({hide: isShowMainButton(row,['1']),hasPermi:'mes:reworkSingle:delete'}), //
]
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {

8
src/views/mes/productBackline/productBackline.data.ts

@ -92,6 +92,14 @@ export const ProductBackline = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.OFF_BACK_STATUS,
dictClass: 'string',
},
{ {
label: '返线工序', label: '返线工序',
field: 'processCode', field: 'processCode',

20
src/views/mes/productOffline/index.vue

@ -33,7 +33,7 @@
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> <ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template> </template>
</Table> </Table>
</ContentWrap> </ContentWrap>
@ -138,10 +138,20 @@ const buttonBaseClick = (val, item) => {
} }
// - // -
const butttondata = [ const butttondata = (row) => {
defaultButtons.mainListEditBtn({hasPermi:'mes:product-offline:update'}), // return [
defaultButtons.mainListDeleteBtn({hasPermi:'mes:product-offline:delete'}), // defaultButtons.mainListEditBtn({hide: isShowMainButton(row,['1']),hasPermi:'mes:reworkSingle:update'}), //
] defaultButtons.mainListDeleteBtn({hide: isShowMainButton(row,['1']),hasPermi:'mes:reworkSingle:delete'}), //
]
}
const isShowMainButton = (row,val) => {
if (val.indexOf(row.status) > -1) {
return false
} else {
return true
}
}
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {

8
src/views/mes/productOffline/productOffline.data.ts

@ -114,6 +114,14 @@ export const ProductOffline = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
dictType: DICT_TYPE.OFF_BACK_STATUS,
dictClass: 'string',
},
{ {
label: '产品去向', label: '产品去向',
field: 'productDestination', field: 'productDestination',

1
src/views/mes/reworkBatch/reworkBatch.data.ts

@ -9,6 +9,7 @@ export const ReworkBatchRules = reactive({
productionCode:[required], productionCode:[required],
replaceFlag:[required], replaceFlag:[required],
status:[required], status:[required],
productionCount:[required]
}) })
export const ReworkBatch = useCrudSchemas(reactive<CrudSchema[]>([ export const ReworkBatch = useCrudSchemas(reactive<CrudSchema[]>([

Loading…
Cancel
Save