|
|
@ -112,15 +112,11 @@ |
|
|
|
} |
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
const isShowMainButton = (row, val) => { |
|
|
|
if(val){ |
|
|
|
if(row.useDecision){ |
|
|
|
return false |
|
|
|
}else{ |
|
|
|
return true |
|
|
|
} |
|
|
|
}else{ |
|
|
|
return !row.isPublished |
|
|
|
const isShowPublishedButton = (row, val) => { |
|
|
|
if(row.useDecision) { |
|
|
|
return row.isPublished |
|
|
|
} else { |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -128,9 +124,9 @@ |
|
|
|
const butttondata = (row) => { |
|
|
|
return [ |
|
|
|
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 |
|
|
|
defaultButtons.mainApplyDecisionBtn({ hide: isShowMainButton(row, null),hasPermi:'qms:inspection-recode-main:edit'}), // 使用决策 |
|
|
|
defaultButtons.mainApplyDecisionBtn({ hide: row.isPublished, hasPermi:'qms:inspection-recode-main:edit'}), // 使用决策 |
|
|
|
// defaultButtons.mainListDeleteBtn(null), // 删除 |
|
|
|
defaultButtons.mainListOrderPubBtn({ hide: isShowMainButton(row,'pub'),hasPermi:'qms:inspection-recode-main:pub'}), // 发布 |
|
|
|
defaultButtons.mainListOrderPubBtn({ hide: isShowPublishedButton(row,'pub'), hasPermi:'qms:inspection-recode-main:pub'}), // 发布 |
|
|
|
defaultButtons.mainListPackageBtn(null), // 包装 |
|
|
|
] |
|
|
|
} |
|
|
|