Commit a5922e57 by Jianli Ou

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

parent fda53f55
......@@ -49,8 +49,8 @@
</div>
</div>
<div v-if="detailInfo.logoutFlag !== 1" class="operation-btns">
<el-button @click="auditEvent(1)" type="primary">审核通过</el-button>
<el-button @click="auditEvent(2)" class="plain-with-border">审核不通过</el-button>
<el-button @click="dialogVisible=true;approvalForm.auditStatus=1" type="primary">审核通过</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>
</div>
<el-image
......@@ -59,6 +59,22 @@
:src="url"
:preview-src-list="srcList">
</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>
</template>
......@@ -78,11 +94,18 @@ export default {
data() {
return {
visible: false,
dialogVisible: false,
branchList: window.CodeTable.ANCCBranches,
branchCode: '',
subCenterName: '',
status: '', //1.首次 2.变更
id: '', //各个表的主键
approvalForm: {
status: '',
id: '',
auditStatus: '',
approve_content: '' // 拒绝原因
},
url: '',
srcList: [],
// 原静态页面定义数据
......@@ -433,19 +456,26 @@ export default {
this.$message.error(result.returnMsg)
}
},
async auditEvent (auditStatus) {
const form = {
id: this.id,
status: this.status,
auditStatus: auditStatus
auditEvent () {
if (this.approvalForm.auditStatus === 2) {
this.$refs['ruleForm'].validate((valid) => {
if (valid) this.submit()
});
} 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) {
this.$message.success('操作成功')
this.$emit('back')
} else {
this.$message.error(result.returnMsg)
}
this.dialogVisible = false
},
initData() {
this.id = this.$route.query.type === 'new' ? this.detailInfo.fid : this.detailInfo.id
......
......@@ -14,7 +14,7 @@
<div class="fail" v-if="tycpdmFirmInfo.logoutFlag === 2">
<img src="../../../assets/image/mymanage/fail.png" alt="">
<span>很抱歉!您未通过中国物品编码中心实名认证。以下为您所在的 <a href="#" target="_blank">分支机构</a> 审核意见:</span>
<p>{{opinion}}</p>
<p>{{tycpdmFirmInfo.approveContent}}</p>
<p class="btn-p">
<el-button @click="modifyInfoBtn" type="primary" style="width: 192px">重新修改企业资料</el-button>
</p>
......@@ -34,7 +34,6 @@ export default {
name: "index",
data() {
return {
opinion:'请修改材料!',
loginInfo: {},
memberInfo: {},
tycpdmFirmInfo: {}
......
......@@ -123,7 +123,7 @@ export default {
} else {
localStorage.setItem('loginInfo', JSON.stringify(res.data))
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'}))
this.$router.push({path: '/MyManage/UnVerify/index'})
} 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