解决按钮权限v-hasPermi与 v-if 冲突问题

This commit is contained in:
bb_pan 2025-03-27 13:42:16 +08:00
parent 4a815d660d
commit 633dd9a01d
32 changed files with 57 additions and 57 deletions

View File

@ -214,35 +214,35 @@
<el-button
type="primary"
@click="subAuditLeaseByCompany(9)"
v-if="queryParams.taskStatus == 30"
v-show="queryParams.taskStatus == 30"
v-hasPermi="['receive:examine:fgs']"
> </el-button
>
<el-button
type="primary"
@click="subAuditLeaseByCompany(5)"
v-if="queryParams.taskStatus == 31"
v-show="queryParams.taskStatus == 31"
v-hasPermi="['receive:examine:sgb']"
> </el-button
>
<el-button
type="primary"
@click="subAuditLeaseByCompany(7)"
v-if="queryParams.taskStatus == 31"
v-show="queryParams.taskStatus == 31"
v-hasPermi="['receive:examine:ajb']"
> </el-button
>
<el-button
type="primary"
@click="subAuditLeaseByCompany(1)"
v-if="queryParams.taskStatus == 32"
v-show="queryParams.taskStatus == 32"
v-hasPermi="['receive:examine:nbry-jjfgs']"
> </el-button
>
<el-button
type="primary"
@click="subAuditLeaseByCompany(3)"
v-if="queryParams.taskStatus == 32"
v-show="queryParams.taskStatus == 32"
v-hasPermi="['receive:examine:nbry-sbfgs']"
> </el-button
>
@ -267,35 +267,35 @@
<el-button
type="primary"
@click="refuseAuditLeaseByCompany(10)"
v-if="queryParams.taskStatus == 30"
v-show="queryParams.taskStatus == 30"
v-hasPermi="['receive:examine:fgs']"
> </el-button
>
<el-button
type="primary"
@click="refuseAuditLeaseByCompany(6)"
v-if="queryParams.taskStatus == 31"
v-show="queryParams.taskStatus == 31"
v-hasPermi="['receive:examine:sgb']"
> </el-button
>
<el-button
type="primary"
@click="refuseAuditLeaseByCompany(8)"
v-if="queryParams.taskStatus == 31"
v-show="queryParams.taskStatus == 31"
v-hasPermi="['receive:examine:ajb']"
> </el-button
>
<el-button
type="primary"
@click="refuseAuditLeaseByCompany(2)"
v-if="queryParams.taskStatus == 32"
v-show="queryParams.taskStatus == 32"
v-hasPermi="['receive:examine:nbry-jjfgs']"
> </el-button
>
<el-button
type="primary"
@click="refuseAuditLeaseByCompany(4)"
v-if="queryParams.taskStatus == 32"
v-show="queryParams.taskStatus == 32"
v-hasPermi="['receive:examine:nbry-sbfgs']"
> </el-button
>

View File

@ -210,7 +210,7 @@
type="primary"
@click="handleExamine(scope.row)"
v-hasPermi="['receive:examine:fgs']"
v-if="
v-show="
Number(scope.row.examineStatusId) == 30 &&
scope.row.deptId == currentDeptId
"
@ -221,7 +221,7 @@
type="primary"
@click="handleExamine(scope.row)"
v-hasPermi="['receive:examine:sgb']"
v-if="
v-show="
Number(scope.row.examineStatusId) == 31 &&
(scope.row.leaseApplyInfoList[0].status == '0' ||
scope.row.leaseApplyInfoList[0].status == '7' ||
@ -235,7 +235,7 @@
type="primary"
@click="handleExamine(scope.row)"
v-hasPermi="['receive:examine:ajb']"
v-if="
v-show="
Number(scope.row.examineStatusId) == 31 &&
(scope.row.leaseApplyInfoList[0].status == '0' ||
scope.row.leaseApplyInfoList[0].status == '5' ||
@ -249,7 +249,7 @@
type="primary"
@click="handleExamine(scope.row, 'jjfgs')"
v-hasPermi="['receive:examine:nbry-jjfgs']"
v-if="
v-show="
Number(scope.row.examineStatusId) == 32 &&
(scope.row.leaseApplyInfoList[0].status == '5' ||
scope.row.leaseApplyInfoList[0].status == '7' ||
@ -263,7 +263,7 @@
type="primary"
@click="handleExamine(scope.row, 'sbfgs')"
v-hasPermi="['receive:examine:nbry-sbfgs']"
v-if="
v-show="
Number(scope.row.examineStatusId) == 32 &&
(scope.row.leaseApplyInfoList[0].status == '5' ||
scope.row.leaseApplyInfoList[0].status == '7' ||

View File

@ -164,7 +164,7 @@
<el-button
size="mini"
type="primary"
v-if="scope.row.taskStatus != 35"
v-show="scope.row.taskStatus != 35"
@click="handleOut(scope.row)"
v-hasPermi="['picking:outbound']"
>

View File

@ -123,9 +123,9 @@
v-model="queryParams.companyAuditRemarks"></el-input>
<div slot="footer" class="dialog-footer">
<el-button @click="examineVisible = false"> </el-button>
<el-button type="primary" @click="subAuditLeaseByCompany(9)" v-if="queryParams.taskStatus == 31"
<el-button type="primary" @click="subAuditLeaseByCompany(9)" v-show="queryParams.taskStatus == 31"
v-hasPermi="['receive:examine:fgs']"> </el-button>
<el-button type="primary" @click="subAuditLeaseByCompany(1)" v-if="queryParams.taskStatus == 32"
<el-button type="primary" @click="subAuditLeaseByCompany(1)" v-show="queryParams.taskStatus == 32"
v-hasPermi="['receive:examine:nbs']"> </el-button>
</div>
</el-dialog>
@ -135,9 +135,9 @@
v-model="queryParams.companyAuditRemarks"></el-input>
<div slot="footer" class="dialog-footer">
<el-button @click="refuseVisible = false"> </el-button>
<el-button type="primary" @click="refuseAuditLeaseByCompany(10)" v-if="queryParams.taskStatus == 31"
<el-button type="primary" @click="refuseAuditLeaseByCompany(10)" v-show="queryParams.taskStatus == 31"
v-hasPermi="['receive:examine:fgs']"> </el-button>
<el-button type="primary" @click="refuseAuditLeaseByCompany(2)" v-if="queryParams.taskStatus == 32"
<el-button type="primary" @click="refuseAuditLeaseByCompany(2)" v-show="queryParams.taskStatus == 32"
v-hasPermi="['receive:examine:nbs']"> </el-button>
</div>
</el-dialog>

View File

@ -232,7 +232,7 @@
type="primary"
@click="handleExamine(scope.row)"
v-hasPermi="['receive:examine:fgs']"
v-if="
v-show="
Number(scope.row.examineStatusId) == 31 ||
Number(scope.row.examineStatusId) == 117
"
@ -243,7 +243,7 @@
type="primary"
@click="handleExamine(scope.row)"
v-hasPermi="['receive:examine:nbs']"
v-if="Number(scope.row.examineStatusId) == 32"
v-show="Number(scope.row.examineStatusId) == 32"
>审批</el-button
>

View File

@ -282,7 +282,7 @@
size="medium"
type="text"
icon="el-icon-edit"
v-if="scope.row.applyStatus == '0'"
v-show="scope.row.applyStatus == '0'"
v-hasPermi="['return:auditing']"
@click="handleUpdate(scope.row, 'update')"
>

View File

@ -221,7 +221,7 @@
@click="handleReturn(scope.row, 'see')"
icon="el-icon-d-arrow-right"
v-hasPermi="['return:btn']"
v-if="scope.row.taskStatus != '40'"
v-show="scope.row.taskStatus != '40'"
>
退料
</el-button>

View File

@ -168,7 +168,7 @@
icon="el-icon-shopping-cart-2"
style="color: #e6a23c"
type="text"
v-if="row.taskStatus != 35"
v-show="row.taskStatus != 35"
@click="handleOut(row)"
v-hasPermi="['picking:outbound:out']"
>

View File

@ -295,7 +295,7 @@
icon="el-icon-edit-outline"
style="color: #e6a23c"
type="text"
v-if="scope.row.taskStatus == '101'"
v-show="scope.row.taskStatus == '101'"
@click="handleUpdate(scope.row)"
v-hasPermi="['return:apply:reject:submit']"
>驳回提交</el-button

View File

@ -285,7 +285,7 @@
icon="el-icon-finished"
style="color: #e6a23c"
type="text"
v-if="scope.row.taskStatus == '37'"
v-show="scope.row.taskStatus == '37'"
v-hasPermi="['return:auditing:auditing']"
@click="handleUpdate(scope.row, 'update')"
>

View File

@ -224,7 +224,7 @@
@click="handleReturn(scope.row, 'see')"
icon="el-icon-d-arrow-right"
v-hasPermi="['return:receive:handler']"
v-if="
v-show="
scope.row.taskStatus == 38 ||
scope.row.taskStatus == 39
"

View File

@ -241,7 +241,7 @@
size="mini"
type="text"
icon="el-icon-setting"
v-if="scope.row.repairStatusCode == '43'"
v-show="scope.row.repairStatusCode == '43'"
@click="handleUpdate(scope.row, 'update')"
v-hasPermi="['service:button']"
>

View File

@ -253,7 +253,7 @@
size="mini"
type="text"
icon="el-icon-setting"
v-if="scope.row.repairStatusCode == '43'"
v-show="scope.row.repairStatusCode == '43'"
@click="handleUpdate(scope.row, 'update')"
v-hasPermi="['service:button']"
>

View File

@ -245,7 +245,7 @@
size="mini"
type="text"
icon="el-icon-circle-check"
v-if="scope.row.taskStatus == 46"
v-show="scope.row.taskStatus == 46"
@click="handleUpdate(scope.row, 'update')"
v-hasPermi="['service:auditing']"
>审核</el-button

View File

@ -70,7 +70,7 @@
icon="el-icon-edit-outline"
@click="handleAuditing(data)"
v-hasPermi="['forecast:waste:auditing']"
v-if="data.taskStatus === 121 || data.taskStatus === 120"
v-show="data.taskStatus === 121 || data.taskStatus === 120"
>审核</el-button
>
</template>

View File

@ -78,7 +78,7 @@
style="color: #f56c6c"
icon="el-icon-finished"
v-hasPermi="['submit:scrap']"
v-if="data.taskStatus == 124"
v-show="data.taskStatus == 124"
@click="handleSubmitScrap(data)"
>提交报废</el-button
>

View File

@ -73,7 +73,7 @@
type="text"
style="color: #e6a23c"
icon="el-icon-edit-outline"
v-if="data.disposition == 0"
v-show="data.disposition == 0"
@click="handleDisposition(data)"
v-hasPermi="['scrap:disposition']"
>

View File

@ -49,7 +49,7 @@
type="text"
style="color: #e6a23c"
icon="el-icon-edit-outline"
v-if="auditingIsShow(data)"
v-show="auditingIsShow(data)"
v-hasPermi="['scrap:auditing']"
@click="handleAuditing(data)"
>

View File

@ -246,7 +246,7 @@
size="mini"
type="warning"
icon="el-icon-edit"
v-if="
v-show="
(scope.row.purchasingStatus == '验收合格') &&
scope.row.manageType != '1'
"

View File

@ -194,7 +194,7 @@
size="mini"
type="text"
icon="el-icon-edit"
v-if="scope.row.taskStatus == '105'"
v-show="scope.row.taskStatus == '105'"
@click="handleUpdate(scope.row)"
v-hasPermi="['warehousing:auditing']"
>审核</el-button

View File

@ -180,7 +180,7 @@
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == '入库进行中'"
v-show="scope.row.taskStatus == '入库进行中'"
v-hasPermi="['repairTest:auditing']"
>审核</el-button
>

View File

@ -85,7 +85,7 @@
v-hasPermi="['system:dept:add']"
>新增</el-button>
<el-button
v-if="scope.row.parentId != 0"
v-show="scope.row.parentId != 0"
size="mini"
type="text"
icon="el-icon-delete"

View File

@ -220,7 +220,7 @@
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="scope.row.userName"
v-show="scope.row.userName"
v-hasPermi="['machinery:keeper:unbind']"
>
解绑

View File

@ -128,7 +128,7 @@
<!-- v-hasPermi="['system:dept:add']"-->
<!-- >新增</el-button>-->
<el-button
v-if="scope.row.parentId != 0"
v-show="scope.row.parentId != 0"
size="mini"
type="danger"
icon="el-icon-delete"

View File

@ -222,7 +222,7 @@
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="scope.row.userName"
v-show="scope.row.userName"
v-hasPermi="['machinery:personnel:unbind']"
>
解绑

View File

@ -125,7 +125,7 @@
plain
icon="el-icon-plus"
size="mini"
v-if="isAccept"
v-show="isAccept"
:disabled="multiple"
@click="handleListCheck"
v-hasPermi="['newPurchase:parts:notice:accept:batch']"
@ -251,7 +251,7 @@
size="mini"
type="text"
icon="el-icon-edit"
v-if="isAccept && scope.row.status == 0"
v-show="isAccept && scope.row.status == 0"
@click="handleCheck(scope.row)"
v-hasPermi="['newPurchase:parts:notice:accept']"
>验收</el-button

View File

@ -140,7 +140,7 @@
<el-button
type="text"
icon="el-icon-edit"
v-if="scope.row.taskStatus == 68"
v-show="scope.row.taskStatus == 68"
@click="handleUpdate(scope.row)"
v-hasPermi="['newPurchase:parts:edit']"
>编辑</el-button
@ -149,7 +149,7 @@
type="text"
icon="el-icon-circle-check"
style="color: #e6a23c"
v-if="scope.row.taskStatus == 68"
v-show="scope.row.taskStatus == 68"
@click="handleCheck(scope.row)"
v-hasPermi="['newPurchase:parts:accept']"
>验收</el-button
@ -166,7 +166,7 @@
style="color: #f56c6c"
type="text"
icon="el-icon-delete"
v-if="scope.row.taskStatus == 68"
v-show="scope.row.taskStatus == 68"
@click="handleDelete(scope.row)"
v-hasPermi="['newPurchase:parts:del']"
>删除</el-button

View File

@ -179,7 +179,7 @@
style="color: #e6a23c"
type="text"
icon="el-icon-finished"
v-if="scope.row.taskStatus == '122'"
v-show="scope.row.taskStatus == '122'"
@click="handleUpdate(scope.row)"
v-hasPermi="['newPurchase:service:auditing']"
>审核</el-button

View File

@ -183,7 +183,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == 24"
v-show="scope.row.taskStatus == 24"
v-hasPermi="['newPurchase:tools:edit']"
>编辑</el-button
>
@ -191,7 +191,7 @@
type="text"
icon="el-icon-circle-check"
style="color: #e6a23c"
v-if="
v-show="
scope.row.purchasingStatus == '待通知' ||
scope.row.purchasingStatus == '待验收'
"
@ -203,7 +203,7 @@
type="text"
icon="el-icon-edit-outline"
style="color: #67c23a"
v-if="
v-show="
scope.row.purchasingStatus == '验收合格' &&
scope.row.manageType != '1'
"
@ -239,7 +239,7 @@
type="text"
style="color: #f56c6c"
icon="el-icon-delete"
v-if="
v-show="
scope.row.purchasingStatus == '待通知' ||
scope.row.purchasingStatus == '验收未通过' ||
scope.row.purchasingStatus ==

View File

@ -200,7 +200,7 @@
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == 69"
v-show="scope.row.taskStatus == 69"
v-hasPermi="['warehousing:newParts:auditing']"
>
审核
@ -209,7 +209,7 @@
size="mini"
type="info"
icon="el-icon-edit"
v-if="scope.row.taskStatus == 70"
v-show="scope.row.taskStatus == 70"
@click="handlePrint(scope.row)"
v-hasPermi="['warehousing:newParts:list']"
>

View File

@ -196,7 +196,7 @@
style="color: #e6a23c"
type="text"
icon="el-icon-finished"
v-if="scope.row.taskStatus == '105'"
v-show="scope.row.taskStatus == '105'"
@click="handleUpdate(scope.row)"
v-hasPermi="['warehousing:newTools:auditing']"
>审核</el-button
@ -205,7 +205,7 @@
type="text"
icon="el-icon-tickets"
style="color: #67c23a"
v-if="
v-show="
scope.row.taskStatus == '28' ||
scope.row.taskStatus == '123'
"

View File

@ -183,7 +183,7 @@
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == '入库进行中'"
v-show="scope.row.taskStatus == '入库进行中'"
v-hasPermi="['warehousing:repair:auditing']"
>审核</el-button
>