Commit 9c8438cac34bdfc91fbe80b8b41560aea3d28aea
1 parent
7bd9ddc9
v1.9 优化合同审批不能审核bugc处理
Showing
2 changed files
with
27 additions
and
27 deletions
src/components/contract/flowAudit.vue
| @@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
| 2 | <el-row> | 2 | <el-row> |
| 3 | <el-col :span="24"> | 3 | <el-col :span="24"> |
| 4 | <el-card> | 4 | <el-card> |
| 5 | - <div slot="header" class="clearfix"> | ||
| 6 | - <h5>{{ $t('flowAudit.auditInfo') }}</h5> | 5 | + <div slot="header" class="flex justify-between "> |
| 6 | + <span>{{ $t('flowAudit.auditInfo') }}</span> | ||
| 7 | </div> | 7 | </div> |
| 8 | - <div class="ibox-content"> | 8 | + <div class=""> |
| 9 | <el-form label-width="120px"> | 9 | <el-form label-width="120px"> |
| 10 | <el-form-item :label="$t('flowAudit.auditStatus')"> | 10 | <el-form-item :label="$t('flowAudit.auditStatus')"> |
| 11 | <el-select v-model="flowAuditInfo.state" :placeholder="$t('flowAudit.pleaseAudit')" style="width:100%"> | 11 | <el-select v-model="flowAuditInfo.state" :placeholder="$t('flowAudit.pleaseAudit')" style="width:100%"> |
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | </div> | 40 | </div> |
| 41 | </el-card> | 41 | </el-card> |
| 42 | </el-col> | 42 | </el-col> |
| 43 | - <select-staff ref="selectStaff" /> | 43 | + <select-staff ref="selectStaff" @selectStaff="handleSelectStaff" /> |
| 44 | </el-row> | 44 | </el-row> |
| 45 | </template> | 45 | </template> |
| 46 | 46 | ||
| @@ -53,16 +53,6 @@ export default { | @@ -53,16 +53,6 @@ export default { | ||
| 53 | components: { | 53 | components: { |
| 54 | SelectStaff | 54 | SelectStaff |
| 55 | }, | 55 | }, |
| 56 | - props: { | ||
| 57 | - callBackListener: { | ||
| 58 | - type: String, | ||
| 59 | - default: '' | ||
| 60 | - }, | ||
| 61 | - callBackFunction: { | ||
| 62 | - type: String, | ||
| 63 | - default: '' | ||
| 64 | - } | ||
| 65 | - }, | ||
| 66 | data() { | 56 | data() { |
| 67 | return { | 57 | return { |
| 68 | flowAuditInfo: { | 58 | flowAuditInfo: { |
| @@ -90,6 +80,10 @@ export default { | @@ -90,6 +80,10 @@ export default { | ||
| 90 | } | 80 | } |
| 91 | }, | 81 | }, |
| 92 | methods: { | 82 | methods: { |
| 83 | + handleSelectStaff(staff) { | ||
| 84 | + this.flowAuditInfo.staffId = staff.userId | ||
| 85 | + this.flowAuditInfo.staffName = staff.userName | ||
| 86 | + }, | ||
| 93 | open(auditOrder) { | 87 | open(auditOrder) { |
| 94 | Object.assign(this.flowAuditInfo, auditOrder) | 88 | Object.assign(this.flowAuditInfo, auditOrder) |
| 95 | this.flowAuditInfo.state = '' | 89 | this.flowAuditInfo.state = '' |
| @@ -117,17 +111,17 @@ export default { | @@ -117,17 +111,17 @@ export default { | ||
| 117 | return | 111 | return |
| 118 | } | 112 | } |
| 119 | 113 | ||
| 120 | - if (this.callBackListener) { | ||
| 121 | - const _flowAuditInfo = { | ||
| 122 | - state: this.flowAuditInfo.state, | ||
| 123 | - remark: this.flowAuditInfo.state === '1200' | ||
| 124 | - ? `${this.$t('flowAudit.reject')}:${this.flowAuditInfo.remark}` | ||
| 125 | - : this.flowAuditInfo.remark, | ||
| 126 | - nextUserId: this.flowAuditInfo.staffId | ||
| 127 | - } | ||
| 128 | - this.$emit(this.callBackFunction, _flowAuditInfo) | ||
| 129 | - this.clearAddBasePrivilegeInfo() | 114 | + |
| 115 | + const _flowAuditInfo = { | ||
| 116 | + state: this.flowAuditInfo.state, | ||
| 117 | + remark: this.flowAuditInfo.state === '1200' | ||
| 118 | + ? `${this.$t('flowAudit.reject')}:${this.flowAuditInfo.remark}` | ||
| 119 | + : this.flowAuditInfo.remark, | ||
| 120 | + nextUserId: this.flowAuditInfo.staffId | ||
| 130 | } | 121 | } |
| 122 | + this.$emit('auditSubmit', _flowAuditInfo) | ||
| 123 | + this.clearAddBasePrivilegeInfo() | ||
| 124 | + | ||
| 131 | }, | 125 | }, |
| 132 | clearAddBasePrivilegeInfo() { | 126 | clearAddBasePrivilegeInfo() { |
| 133 | this.flowAuditInfo = { | 127 | this.flowAuditInfo = { |
| @@ -160,7 +154,7 @@ export default { | @@ -160,7 +154,7 @@ export default { | ||
| 160 | this.$refs.selectStaff.open(this.flowAuditInfo) | 154 | this.$refs.selectStaff.open(this.flowAuditInfo) |
| 161 | }, | 155 | }, |
| 162 | _goBack() { | 156 | _goBack() { |
| 163 | - this.$emit(this.callBackListener, 'list', {}) | 157 | + this.$emit('goBack', {}) |
| 164 | } | 158 | } |
| 165 | } | 159 | } |
| 166 | } | 160 | } |
src/views/contract/contractApplyAuditOrdersList.vue
| @@ -38,8 +38,7 @@ | @@ -38,8 +38,7 @@ | ||
| 38 | </el-card> | 38 | </el-card> |
| 39 | </el-col> | 39 | </el-col> |
| 40 | </el-row> | 40 | </el-row> |
| 41 | - <flow-audit v-else ref="flowAudit" :call-back-listener="'contractApplyAuditOrders'" | ||
| 42 | - :call-back-function="'notifyAudit'" /> | 41 | + <flow-audit v-else ref="flowAudit" @auditSubmit="handleAuditSubmit" @goBack="handleGoBack" /> |
| 43 | </div> | 42 | </div> |
| 44 | </template> | 43 | </template> |
| 45 | 44 | ||
| @@ -85,6 +84,13 @@ export default { | @@ -85,6 +84,13 @@ export default { | ||
| 85 | this._loadStepStaff() | 84 | this._loadStepStaff() |
| 86 | }, | 85 | }, |
| 87 | methods: { | 86 | methods: { |
| 87 | + handleGoBack() { | ||
| 88 | + this.contractApplyAuditOrdersInfo.audit = '1' | ||
| 89 | + this._listAuditOrders(this.page.current, this.page.size) | ||
| 90 | + }, | ||
| 91 | + handleAuditSubmit(auditInfo) { | ||
| 92 | + this._auditOrderInfo(auditInfo) | ||
| 93 | + }, | ||
| 88 | async _listAuditOrders(page, rows) { | 94 | async _listAuditOrders(page, rows) { |
| 89 | try { | 95 | try { |
| 90 | this.contractApplyAuditOrdersInfo.audit = '1' | 96 | this.contractApplyAuditOrdersInfo.audit = '1' |