郫都积分
This commit is contained in:
@@ -46,11 +46,27 @@
|
||||
<el-table-column slot="options" width="120px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="operation(row.id)" v-if="row.status === '0'">审核</el-button>
|
||||
<el-button type="text" @click="operation(row)" v-if="row.status === '0'">审核</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</ai-table>
|
||||
<ai-dialog :customFooter="true"
|
||||
title="积分审核"
|
||||
:visible.sync="dialog"
|
||||
:destroyOnClose="true"
|
||||
width="720px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="积分" prop="applyIntegral">
|
||||
<el-input v-model.trim="form.applyIntegral" placeholder="请输入正数" size="small"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<p style="padding-left:80px;font-weight:700;">请根据申请事项和凭证选是否审核通过</p>
|
||||
<div class="dialog-footer" slot="footer">
|
||||
<el-button @click="onCancel" size="medium">审核拒绝</el-button>
|
||||
<el-button @click="onConfirm" type="primary" size="medium">审核通过</el-button>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
</template>
|
||||
</ai-list>
|
||||
</template>
|
||||
@@ -91,7 +107,13 @@
|
||||
}
|
||||
],
|
||||
tableData: [],
|
||||
total: 0
|
||||
total: 0,
|
||||
form: {applyIntegral: '', id: ''},
|
||||
rules: {
|
||||
applyIntegral: [{required: true, message: '请输入积分', trigger: 'blur' },
|
||||
{pattern: /^([1-9]\d*|0)(\.\d{1,2})?$/, message: '请输入正数且最多只能保留两位小数'}],
|
||||
},
|
||||
dialog: false,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -115,29 +137,29 @@
|
||||
})
|
||||
},
|
||||
|
||||
operation (id) {
|
||||
this.$confirm('请根据申请事项和凭证选是否审核通过', {
|
||||
confirmButtonText: '审核通过',
|
||||
cancelButtonText: '审核拒绝',
|
||||
distinguishCancelAndClose: true
|
||||
}).then(() => {
|
||||
this.instance.post(`/app/appintegralmemberapply/auditApply?id=${id}&opType=1`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('审核通过成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}).catch(action => {
|
||||
if (action === 'cancel') {
|
||||
this.instance.post(`/app/appintegralmemberapply/auditApply?id=${id}&opType=2`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('审核拒绝成功')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
operation (row) {
|
||||
this.dialog = true
|
||||
this.form = {...row}
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
this.instance.post(`/app/appintegralmemberapply/auditApply?id=${this.form.id}&opType=1&applyIntegral=${this.form.applyIntegral}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('审核通过成功')
|
||||
this.dialog = false
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onCancel() {
|
||||
this.instance.post(`/app/appintegralmemberapply/auditApply?id=${this.form.id}&opType=2&applyIntegral=${this.form.applyIntegral}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('审核拒绝成功')
|
||||
this.dialog = false
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user