Commit a5922e57 by Jianli Ou

厂商实名认证审核拒绝增加拒绝理由交互逻辑

parent fda53f55
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
</div> </div>
</div> </div>
<div v-if="detailInfo.logoutFlag !== 1" class="operation-btns"> <div v-if="detailInfo.logoutFlag !== 1" class="operation-btns">
<el-button @click="auditEvent(1)" type="primary">审核通过</el-button> <el-button @click="dialogVisible=true;approvalForm.auditStatus=1" type="primary">审核通过</el-button>
<el-button @click="auditEvent(2)" class="plain-with-border">审核不通过</el-button> <el-button @click="dialogVisible=true;approvalForm.auditStatus=2" class="plain-with-border">审核不通过</el-button>
<el-button class="plain-with-border" v-if="reset">重置</el-button> <el-button class="plain-with-border" v-if="reset">重置</el-button>
</div> </div>
<el-image <el-image
...@@ -59,6 +59,22 @@ ...@@ -59,6 +59,22 @@
:src="url" :src="url"
:preview-src-list="srcList"> :preview-src-list="srcList">
</el-image> </el-image>
<el-dialog
:title="approvalForm.auditStatus===1?'审核通过':'审核不通过'"
:visible.sync="dialogVisible"
top="30vh"
width="40%">
<span>{{approvalForm.auditStatus===1?'是否确认审核通过?':'请输入审核不通过原因'}}</span>
<el-form v-if="approvalForm.auditStatus===2" :model="approvalForm" ref="ruleForm" label-width="0px">
<el-form-item prop="approve_content" :rules="[{ required: true, message: '请填写拒绝原因', trigger: 'blur' }]">
<el-input type="textarea" v-model="approvalForm.approve_content"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" size="small" @click="auditEvent">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</div> </div>
</template> </template>
...@@ -78,11 +94,18 @@ export default { ...@@ -78,11 +94,18 @@ export default {
data() { data() {
return { return {
visible: false, visible: false,
dialogVisible: false,
branchList: window.CodeTable.ANCCBranches, branchList: window.CodeTable.ANCCBranches,
branchCode: '', branchCode: '',
subCenterName: '', subCenterName: '',
status: '', //1.首次 2.变更 status: '', //1.首次 2.变更
id: '', //各个表的主键 id: '', //各个表的主键
approvalForm: {
status: '',
id: '',
auditStatus: '',
approve_content: '' // 拒绝原因
},
url: '', url: '',
srcList: [], srcList: [],
// 原静态页面定义数据 // 原静态页面定义数据
...@@ -433,19 +456,26 @@ export default { ...@@ -433,19 +456,26 @@ export default {
this.$message.error(result.returnMsg) this.$message.error(result.returnMsg)
} }
}, },
async auditEvent (auditStatus) { auditEvent () {
const form = { if (this.approvalForm.auditStatus === 2) {
id: this.id, this.$refs['ruleForm'].validate((valid) => {
status: this.status, if (valid) this.submit()
auditStatus: auditStatus });
} else {
this.submit()
} }
const result = await this.$api.myManage.tycpdmfirmAudit(form) },
async submit() {
this.approvalForm.status = this.status
this.approvalForm.id = this.id
const result = await this.$api.myManage.tycpdmfirmAudit(this.approvalForm)
if (result.success) { if (result.success) {
this.$message.success('操作成功') this.$message.success('操作成功')
this.$emit('back') this.$emit('back')
} else { } else {
this.$message.error(result.returnMsg) this.$message.error(result.returnMsg)
} }
this.dialogVisible = false
}, },
initData() { initData() {
this.id = this.$route.query.type === 'new' ? this.detailInfo.fid : this.detailInfo.id this.id = this.$route.query.type === 'new' ? this.detailInfo.fid : this.detailInfo.id
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<div class="fail" v-if="tycpdmFirmInfo.logoutFlag === 2"> <div class="fail" v-if="tycpdmFirmInfo.logoutFlag === 2">
<img src="../../../assets/image/mymanage/fail.png" alt=""> <img src="../../../assets/image/mymanage/fail.png" alt="">
<span>很抱歉!您未通过中国物品编码中心实名认证。以下为您所在的 <a href="#" target="_blank">分支机构</a> 审核意见:</span> <span>很抱歉!您未通过中国物品编码中心实名认证。以下为您所在的 <a href="#" target="_blank">分支机构</a> 审核意见:</span>
<p>{{opinion}}</p> <p>{{tycpdmFirmInfo.approveContent}}</p>
<p class="btn-p"> <p class="btn-p">
<el-button @click="modifyInfoBtn" type="primary" style="width: 192px">重新修改企业资料</el-button> <el-button @click="modifyInfoBtn" type="primary" style="width: 192px">重新修改企业资料</el-button>
</p> </p>
...@@ -34,7 +34,6 @@ export default { ...@@ -34,7 +34,6 @@ export default {
name: "index", name: "index",
data() { data() {
return { return {
opinion:'请修改材料!',
loginInfo: {}, loginInfo: {},
memberInfo: {}, memberInfo: {},
tycpdmFirmInfo: {} tycpdmFirmInfo: {}
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
} else { } else {
localStorage.setItem('loginInfo', JSON.stringify(res.data)) localStorage.setItem('loginInfo', JSON.stringify(res.data))
localStorage.setItem('TOKEN', res.data.token) localStorage.setItem('TOKEN', res.data.token)
if (res.data.userType === 3) { if (res.data.userType === 3 && res.data.levels === null) {
localStorage.setItem('gs-user', JSON.stringify({type: 'unVerify'})) localStorage.setItem('gs-user', JSON.stringify({type: 'unVerify'}))
this.$router.push({path: '/MyManage/UnVerify/index'}) this.$router.push({path: '/MyManage/UnVerify/index'})
} else if (res.data.userType === 2) { } else if (res.data.userType === 2) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment