解决商品编辑页面保存按钮权限控制的bug

This commit is contained in:
季圣华
2023-06-04 18:09:07 +08:00
parent 305b9c4954
commit b308c8182e
2 changed files with 4 additions and 7 deletions

View File

@@ -387,7 +387,7 @@
this.$refs.modalForm.title = "编辑"; this.$refs.modalForm.title = "编辑";
this.$refs.modalForm.disableSubmit = false; this.$refs.modalForm.disableSubmit = false;
if(this.btnEnableList.indexOf(1)===-1) { if(this.btnEnableList.indexOf(1)===-1) {
this.$refs.modalForm.isReadOnly = true this.$refs.modalForm.showOkFlag = false
} }
}, },
getImgUrl(imgName) { getImgUrl(imgName) {

View File

@@ -7,15 +7,12 @@
v-bind:prefixNo="prefixNo" v-bind:prefixNo="prefixNo"
switchHelp switchHelp
switchFullscreen switchFullscreen
@ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
cancelText="关闭"
:id="prefixNo" :id="prefixNo"
:style="modalStyle"> :style="modalStyle">
<template slot="footer"> <template slot="footer">
<a-button key="back" v-if="isReadOnly" @click="handleCancel"> <a-button key="back" @click="handleCancel">关闭</a-button>
关闭 <a-button type="primary" v-if="showOkFlag" :loading="confirmLoading" @click="handleOk">确定</a-button>
</a-button>
</template> </template>
<a-spin :spinning="confirmLoading"> <a-spin :spinning="confirmLoading">
<a-form :form="form"> <a-form :form="form">
@@ -321,7 +318,7 @@
skuTwoList: [], skuTwoList: [],
manySkuSelected: 0, manySkuSelected: 0,
model: {}, model: {},
isReadOnly: false, showOkFlag: true,
labelCol: { labelCol: {
xs: { span: 24 }, xs: { span: 24 },
sm: { span: 8 }, sm: { span: 8 },