|
@@ -1,8 +1,9 @@
|
|
|
<template>
|
|
|
<template-page
|
|
|
+ v-if="showTable"
|
|
|
ref="pageRef"
|
|
|
:get-list="getList"
|
|
|
- :exportList="exportList"
|
|
|
+ :exportList="status === 'ToBeReviewed' ? undefined : exportList"
|
|
|
:table-attributes="tableAttributes"
|
|
|
:table-events="tableEvents"
|
|
|
:options-evens-group="optionsEvensGroup"
|
|
@@ -10,6 +11,15 @@
|
|
|
:column-parsing="columnParsing"
|
|
|
:operation="operation()"
|
|
|
>
|
|
|
+ <div slot="moreSearch">
|
|
|
+ <el-radio-group v-model="status" size="mini" @change="changeType">
|
|
|
+ <el-radio-button label="NO">未签署({{ tongji[0] || 0 }})</el-radio-button>
|
|
|
+ <el-radio-button label="YES">已签署</el-radio-button>
|
|
|
+ <el-radio-button label="">全部</el-radio-button>
|
|
|
+ <el-radio-button label="ToBeReviewed">待审核({{ tongji[1] || 0 }})</el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ <br /><br />
|
|
|
+ </div>
|
|
|
<div class="cartographer_big">
|
|
|
<el-dialog
|
|
|
title="师傅签署信息"
|
|
@@ -29,6 +39,12 @@
|
|
|
</zj-page-fill>
|
|
|
<div style="text-align: right; box-sizing: border-box; padding: 16px 20px">
|
|
|
<el-button size="mini" @click="handleClose">取消</el-button>
|
|
|
+ <el-button v-if="status === 'ToBeReviewed'" type="primary" size="mini" @click="shenhecz('OK')"
|
|
|
+ >审核通过</el-button
|
|
|
+ >
|
|
|
+ <el-button v-if="status === 'ToBeReviewed'" type="danger" size="mini" @click="shenhecz('FAIL')"
|
|
|
+ >审核驳回</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</zj-page-container>
|
|
|
</el-dialog>
|
|
@@ -43,7 +59,12 @@ import operation_mixin from '@/components/template/operation_mixin.js'
|
|
|
import {
|
|
|
workerElecConfirmList,
|
|
|
workerElecConfirmListExport,
|
|
|
- workerElecConfirmDetail
|
|
|
+ workerElecConfirmDetail,
|
|
|
+ workerElecConfirmCount,
|
|
|
+ workerElecConfirmManualList,
|
|
|
+ workerElecConfirmManualDetail,
|
|
|
+ workerElecConfirmManualConfirm,
|
|
|
+ workerElecConfirmManualCount
|
|
|
} from '@/api/masterEPaymentSigning.js'
|
|
|
import ImageUpload from '@/components/file-upload'
|
|
|
export default {
|
|
@@ -64,7 +85,10 @@ export default {
|
|
|
recordSelected: [],
|
|
|
/** 表单变量 */
|
|
|
formDialog: false,
|
|
|
- formData: {}
|
|
|
+ formData: {},
|
|
|
+ status: 'NO',
|
|
|
+ showTable: true,
|
|
|
+ tongji: []
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -79,6 +103,7 @@ export default {
|
|
|
formItems() {
|
|
|
return [
|
|
|
{
|
|
|
+ isShow: this.status !== 'ToBeReviewed',
|
|
|
md: 6,
|
|
|
name: 'el-radio',
|
|
|
options: [
|
|
@@ -93,6 +118,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
+ isShow: this.status === 'ToBeReviewed',
|
|
|
+ md: 6,
|
|
|
+ name: 'el-radio',
|
|
|
+ options: [
|
|
|
+ { label: '通过', value: 'OK' },
|
|
|
+ { label: '待审', value: 'WAIT' }
|
|
|
+ ],
|
|
|
+ attributes: { disabled: true },
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '状态',
|
|
|
+ prop: 'status',
|
|
|
+ rules: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
name: 'el-input',
|
|
|
md: 6,
|
|
|
attributes: { disabled: true, placeholder: '' },
|
|
@@ -144,8 +184,34 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ changeType(v) {
|
|
|
+ this.showTable = false
|
|
|
+ this.status = v
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.showTable = true
|
|
|
+ })
|
|
|
+ },
|
|
|
// 列表请求函数
|
|
|
- getList: workerElecConfirmList,
|
|
|
+ getList(p, cb) {
|
|
|
+ var pam = JSON.parse(JSON.stringify(p))
|
|
|
+ try {
|
|
|
+ if (this.status === 'ToBeReviewed') {
|
|
|
+ cb && cb(pam)
|
|
|
+ return workerElecConfirmManualList(pam)
|
|
|
+ } else {
|
|
|
+ if (this.status) {
|
|
|
+ pam.params.push({ param: 'a.status', compare: '=', value: this.status })
|
|
|
+ }
|
|
|
+ cb && cb(pam)
|
|
|
+ return workerElecConfirmList(pam)
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ } finally {
|
|
|
+ Promise.all([workerElecConfirmCount(), workerElecConfirmManualCount()]).then(([res1, res2]) => {
|
|
|
+ this.tongji = [res1.data, res2.data]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
// 列表导出函数
|
|
|
exportList: workerElecConfirmListExport,
|
|
|
// 表格列解析渲染数据更改
|
|
@@ -161,10 +227,24 @@ export default {
|
|
|
this.$data.formData = this.$options.data().formData
|
|
|
this.formDialog = false
|
|
|
},
|
|
|
+ shenhecz(s) {
|
|
|
+ workerElecConfirmManualConfirm({
|
|
|
+ id: this.formData.id,
|
|
|
+ status: s
|
|
|
+ }).then(res => {
|
|
|
+ this.$message({ type: 'success', message: `审核成功!` })
|
|
|
+ this.$refs.pageRef.refreshList()
|
|
|
+ this.handleClose()
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 操作按钮
|
|
|
operation() {
|
|
|
return this.operationBtn({
|
|
|
details: {
|
|
|
+ conditions: ({ row, index, column }) => {
|
|
|
+ return this.status !== 'ToBeReviewed'
|
|
|
+ },
|
|
|
click: ({ row, index, column }) => {
|
|
|
workerElecConfirmDetail({
|
|
|
belongCompanyCode: row.belongCompanyCode,
|
|
@@ -176,6 +256,21 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ },
|
|
|
+ shenhe: {
|
|
|
+ conditions: ({ row, index, column }) => {
|
|
|
+ return this.status === 'ToBeReviewed'
|
|
|
+ },
|
|
|
+ click: ({ row, index, column }) => {
|
|
|
+ workerElecConfirmManualDetail({
|
|
|
+ id: row.id
|
|
|
+ }).then(res => {
|
|
|
+ this.formData = res.data
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.formDialog = true
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|