|
@ -112,15 +112,11 @@ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
// 根据状态返回该按钮是否显示 |
|
|
const isShowMainButton = (row, val) => { |
|
|
const isShowPublishedButton = (row, val) => { |
|
|
if(val){ |
|
|
if(row.useDecision) { |
|
|
if(row.useDecision){ |
|
|
return row.isPublished |
|
|
return false |
|
|
} else { |
|
|
}else{ |
|
|
return true |
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
return !row.isPublished |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -128,9 +124,9 @@ |
|
|
const butttondata = (row) => { |
|
|
const butttondata = (row) => { |
|
|
return [ |
|
|
return [ |
|
|
// defaultButtons.mainListOrderCOMPLETEBtn({ hide: isShowMainButton(row, ['INCOMPLETE']) }), // 完成 |
|
|
// 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.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), // 包装 |
|
|
defaultButtons.mainListPackageBtn(null), // 包装 |
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
|