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 | 2 | <el-row> |
| 3 | 3 | <el-col :span="24"> |
| 4 | 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 | 7 | </div> |
| 8 | - <div class="ibox-content"> | |
| 8 | + <div class=""> | |
| 9 | 9 | <el-form label-width="120px"> |
| 10 | 10 | <el-form-item :label="$t('flowAudit.auditStatus')"> |
| 11 | 11 | <el-select v-model="flowAuditInfo.state" :placeholder="$t('flowAudit.pleaseAudit')" style="width:100%"> |
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | </div> |
| 41 | 41 | </el-card> |
| 42 | 42 | </el-col> |
| 43 | - <select-staff ref="selectStaff" /> | |
| 43 | + <select-staff ref="selectStaff" @selectStaff="handleSelectStaff" /> | |
| 44 | 44 | </el-row> |
| 45 | 45 | </template> |
| 46 | 46 | |
| ... | ... | @@ -53,16 +53,6 @@ export default { |
| 53 | 53 | components: { |
| 54 | 54 | SelectStaff |
| 55 | 55 | }, |
| 56 | - props: { | |
| 57 | - callBackListener: { | |
| 58 | - type: String, | |
| 59 | - default: '' | |
| 60 | - }, | |
| 61 | - callBackFunction: { | |
| 62 | - type: String, | |
| 63 | - default: '' | |
| 64 | - } | |
| 65 | - }, | |
| 66 | 56 | data() { |
| 67 | 57 | return { |
| 68 | 58 | flowAuditInfo: { |
| ... | ... | @@ -90,6 +80,10 @@ export default { |
| 90 | 80 | } |
| 91 | 81 | }, |
| 92 | 82 | methods: { |
| 83 | + handleSelectStaff(staff) { | |
| 84 | + this.flowAuditInfo.staffId = staff.userId | |
| 85 | + this.flowAuditInfo.staffName = staff.userName | |
| 86 | + }, | |
| 93 | 87 | open(auditOrder) { |
| 94 | 88 | Object.assign(this.flowAuditInfo, auditOrder) |
| 95 | 89 | this.flowAuditInfo.state = '' |
| ... | ... | @@ -117,17 +111,17 @@ export default { |
| 117 | 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 | 126 | clearAddBasePrivilegeInfo() { |
| 133 | 127 | this.flowAuditInfo = { |
| ... | ... | @@ -160,7 +154,7 @@ export default { |
| 160 | 154 | this.$refs.selectStaff.open(this.flowAuditInfo) |
| 161 | 155 | }, |
| 162 | 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 | 38 | </el-card> |
| 39 | 39 | </el-col> |
| 40 | 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 | 42 | </div> |
| 44 | 43 | </template> |
| 45 | 44 | |
| ... | ... | @@ -85,6 +84,13 @@ export default { |
| 85 | 84 | this._loadStepStaff() |
| 86 | 85 | }, |
| 87 | 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 | 94 | async _listAuditOrders(page, rows) { |
| 89 | 95 | try { |
| 90 | 96 | this.contractApplyAuditOrdersInfo.audit = '1' | ... | ... |