Browse Source

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

master_hella_20240701
TengXF 6 months ago
parent
commit
b0fd2b93e7
  1. 7
      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

7
src/utils/dict.ts

@ -309,7 +309,7 @@ export enum DICT_TYPE {
QUALITY_NOTIFICATION_TYPE = "quality_notification_type", // 质量通知类型
QUALITY_NOTICE_STATUS = "quality_notice_status", // 质量通知状态
QUALITY_TASK_STATUS = "quality_task_status", // 质量通知任务状态
// ========== 业务 - mes -gaojs ==========
QUALIFY_STATUS = 'qualify_status',//质检状态
QUALIFY_ITEM_DATA_TYPE='qualify_item_data_type',//质检项目数据类型
@ -350,9 +350,10 @@ export enum DICT_TYPE {
PART_CLASS = 'part_class', //备件分类
FAILURE_DEGREE = 'failure_degree', // 故障紧急程度
FAILURE_REASON = 'failure_reason', //故障类型
REPAIR_DEGREE = 'repair_degree', //维修紧急程度
REPAIR_DEGREE = 'repair_degree', //维修紧急程度
REPAIR_LEVEL = 'repair_level', //维修级别
IS_COMPLETED = 'is_completed', //是否完成
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>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -138,10 +138,20 @@ const buttonBaseClick = (val, item) => {
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:product-backline:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:product-backline:delete'}), //
]
const butttondata = (row) => {
return [
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) => {

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: '返线工序',
field: 'processCode',

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

@ -33,7 +33,7 @@
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
<ButtonBase :Butttondata="butttondata(row)" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
@ -138,10 +138,20 @@ const buttonBaseClick = (val, item) => {
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'mes:product-offline:update'}), //
defaultButtons.mainListDeleteBtn({hasPermi:'mes:product-offline:delete'}), //
]
const butttondata = (row) => {
return [
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) => {

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: '产品去向',
field: 'productDestination',

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

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

Loading…
Cancel
Save