|
|
@@ -4,7 +4,7 @@
|
|
|
<span>验证发票</span>
|
|
|
</div>
|
|
|
<div class="t-title">
|
|
|
- <span>发票图片</span>
|
|
|
+ <span>发票图片</span> <span> <el-link type="primary">下载发票附件</el-link></span>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-image
|
|
|
@@ -28,11 +28,12 @@
|
|
|
<span v-else>--</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="primary">验证通过</el-button>
|
|
|
- <el-button type="danger" @click="onOneNo">验证不通过</el-button>
|
|
|
+ <el-button type="primary" @click="onPictureAudit(true)" v-if="invoiceRow.picture_verify_status === '0'">验证通过
|
|
|
+ </el-button>
|
|
|
+ <el-button type="danger" @click="onAudit('picture')">验证不通过</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <div v-if="invoiceRow.picture_verify_status == 1">
|
|
|
<div class="t-title">
|
|
|
<span>纸质发票审核 </span>
|
|
|
<span v-if="invoiceRow.paper_verify_status === '0'"> [待审核]</span>
|
|
|
@@ -41,17 +42,62 @@
|
|
|
<span v-else>--</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button type="primary">验证通过</el-button>
|
|
|
- <el-button type="danger">验证不通过</el-button>
|
|
|
+ <el-button type="primary" @click="onPaperAudit(true)" v-if="invoiceRow.paper_verify_status === '0'">验证通过</el-button>
|
|
|
+ <el-button type="danger" @click="onAudit('paper')">验证不通过</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
<div class="t-title">
|
|
|
<span>审核记录 </span>
|
|
|
</div>
|
|
|
+ <div style="margin-top:5px" v-for="item in auditData">
|
|
|
+ <el-card shadow="never">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div style="font-weight: 700">{{item.status_name}}--{{item.is_auto?'系统自动审核':'人工审核'}}</div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="10" :offset="2">
|
|
|
+ <div>{{item.nickname}} {{item.audit_date}}</div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-top: 10px" v-if="item.status == '3'">
|
|
|
+ <el-col :span="12">
|
|
|
+ <div style="font-weight: 700">拒绝理由:</div>
|
|
|
+ <div style="padding: 5px">
|
|
|
+ {{item.audit_data.reason || ''}}
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
-
|
|
|
+ <el-dialog
|
|
|
+ title="请输入发票图片审核不通过的原因"
|
|
|
+ :visible.sync="pictureAuditModel"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-input v-model="pictureReason"></el-input>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="pictureAuditModel = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="onPictureAudit(false)">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="请输入纸质发票审核不通过的原因"
|
|
|
+ :visible.sync="PaperAuditModel"
|
|
|
+ width="30%"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <el-input v-model="PaperReason"></el-input>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="PaperAuditModel = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="onPaperAudit(false)">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -62,7 +108,12 @@
|
|
|
return {
|
|
|
ids: 0,
|
|
|
srcList: [],
|
|
|
- invoiceRow: {}
|
|
|
+ invoiceRow: {},
|
|
|
+ paperReason: '',
|
|
|
+ pictureReason: '',
|
|
|
+ paperAuditModel: false,
|
|
|
+ pictureAuditModel: false,
|
|
|
+ auditData: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -71,20 +122,85 @@
|
|
|
methods: {
|
|
|
async getInvoiceDetail() {
|
|
|
let id = this.ids;
|
|
|
- debugger;
|
|
|
if (id === 0) {
|
|
|
this.$message.error('id不存在');
|
|
|
return false;
|
|
|
}
|
|
|
let res = await this.$post("/api/admin/kaifabao/getInvoiceAuditInfo", {id: id});
|
|
|
if (res && res.status === 1) {
|
|
|
- this.invoiceRow = res.data;
|
|
|
- this.srcList = [res.data.invoice_url];
|
|
|
- debugger;
|
|
|
+ this.invoiceRow = res.data.invoice;
|
|
|
+ this.srcList = [res.data.invoice.invoice_url];
|
|
|
+ this.auditData = res.data.auditData || [];
|
|
|
}
|
|
|
},
|
|
|
- onOneNo() {
|
|
|
+ onAudit(action) {
|
|
|
+ //图片发票 纸质发票
|
|
|
+ if (action === 'picture') {
|
|
|
+ this.pictureAuditModel = true;
|
|
|
+ } else if (action === 'paper') {
|
|
|
|
|
|
+ this.PaperAuditModel = true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //图片
|
|
|
+ async onPictureAudit(isTrue) {
|
|
|
+ let data = {};
|
|
|
+ //图片审核
|
|
|
+ if (isTrue) {
|
|
|
+ data = {
|
|
|
+ invoiceId: this.ids,
|
|
|
+ action: 'approve'
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ if (!this.pictureReason) {
|
|
|
+ this.$message.error('原因不能为空');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ data = {
|
|
|
+ invoiceId: this.ids,
|
|
|
+ action: 'reject',
|
|
|
+ reason: this.pictureReason
|
|
|
+ };
|
|
|
+ }
|
|
|
+ let res = await this.$post("/api/admin/kaifabao/auditInvoiceWithdrawalPicture", data);
|
|
|
+ if (res && res.status === 1) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.pictureAuditModel = false;
|
|
|
+ this.getInvoiceDetail();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //纸质
|
|
|
+ async onPaperAudit(isTrue) {
|
|
|
+ let data = {};
|
|
|
+ //纸质发票审核
|
|
|
+ if (isTrue) {
|
|
|
+ data = {
|
|
|
+ invoiceId: this.ids,
|
|
|
+ action: 'approve'
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ if (!this.paperReason) {
|
|
|
+ this.$message.error('原因不能为空');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ data = {
|
|
|
+ invoiceId: this.ids,
|
|
|
+ action: 'reject',
|
|
|
+ reason: this.paperReason
|
|
|
+ };
|
|
|
+ }
|
|
|
+ let res = await this.$post("/api/admin/kaifabao/auditInvoiceWithdrawalPaper", data);
|
|
|
+ if (res && res.status === 1) {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.paperAuditModel = false;
|
|
|
+ this.getInvoiceDetail();
|
|
|
+ }
|
|
|
},
|
|
|
getUrlParam(name) {
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|