Commit 13f457c98e6f71dedf27656c434b26c1e67c894d
1 parent
274e44b5
v1.9 优化OA测试bug 优化
Showing
7 changed files
with
17 additions
and
224 deletions
src/components/oa/newOaWorkflowForm.vue
| ... | ... | @@ -213,11 +213,14 @@ export default { |
| 213 | 213 | if (res.code === 0) { |
| 214 | 214 | this.$message.success(this.$t('common.operationSuccess')) |
| 215 | 215 | this.resetForm() |
| 216 | - this.$emit('switch-tab', 'newOaWorkflowPool') | |
| 216 | + console.log('子组件准备发出 success 事件', 'newOaWorkflowUndo') | |
| 217 | + this.$emit('success', 'newOaWorkflowUndo') | |
| 218 | + console.log('子组件已发出 success 事件') | |
| 217 | 219 | } else { |
| 218 | 220 | this.$message.error(res.msg || this.$t('common.submitFailed')) |
| 219 | 221 | } |
| 220 | 222 | } catch (error) { |
| 223 | + console.log('提交表单失败,错误信息:', error) | |
| 221 | 224 | if (error.message) { |
| 222 | 225 | // 表单验证错误 |
| 223 | 226 | return |
| ... | ... | @@ -249,7 +252,7 @@ export default { |
| 249 | 252 | |
| 250 | 253 | resetForm() { |
| 251 | 254 | this.$refs.form.resetFields() |
| 252 | - if (this.$refs.uploadFile) { | |
| 255 | + if (this.$refs.uploadFile && this.$refs.uploadFile.clear) { | |
| 253 | 256 | this.$refs.uploadFile.clear() |
| 254 | 257 | } |
| 255 | 258 | this.fileName = '' | ... | ... |
src/views/fee/roomFeeImportDetail.md deleted
| 1 | -```html | |
| 2 | -<div class=" animated fadeInRight ecommerce"> | |
| 3 | - <div class="row"> | |
| 4 | - <div class="col-lg-12"> | |
| 5 | - <div class="ibox "> | |
| 6 | - <div class="ibox-title"> | |
| 7 | - <h5> | |
| 8 | - <span><vc:i18n name="查询条件" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 9 | - </h5> | |
| 10 | - <div class="ibox-tools" style="top:10px;"> | |
| 11 | - <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;" | |
| 12 | - v-on:click="_moreCondition()"> | |
| 13 | - {{roomFeeImportDetailInfo.moreCondition == true?'隐藏':'更多'}} | |
| 14 | - </button> | |
| 15 | - </div> | |
| 16 | - </div> | |
| 17 | - <div class="ibox-content"> | |
| 18 | - <div class="row"> | |
| 19 | - <div class="col-sm-4"> | |
| 20 | - <div class="form-group"> | |
| 21 | - <input type="text" :placeholder="vc.i18n('请输入楼栋编号','roomFeeImportDetail')" | |
| 22 | - v-model="roomFeeImportDetailInfo.conditions.floorNum" class=" form-control"> | |
| 23 | - </div> | |
| 24 | - </div> | |
| 25 | - <div class="col-sm-4"> | |
| 26 | - <div class="form-group"> | |
| 27 | - <input type="text" :placeholder="vc.i18n('请输入单元编号','roomFeeImportDetail')" | |
| 28 | - v-model="roomFeeImportDetailInfo.conditions.unitNum" class=" form-control"> | |
| 29 | - </div> | |
| 30 | - </div> | |
| 31 | - <div class="col-sm-3"> | |
| 32 | - <div class="form-group"> | |
| 33 | - <input type="text" :placeholder="vc.i18n('请输入房屋编号','roomFeeImportDetail')" | |
| 34 | - v-model="roomFeeImportDetailInfo.conditions.roomNum" class=" form-control"> | |
| 35 | - </div> | |
| 36 | - </div> | |
| 37 | - <div class="col-sm-2"> | |
| 38 | - <button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFeeDetailMethod()"> | |
| 39 | - <i class="fa fa-search"></i> | |
| 40 | - <span><vc:i18n name="查询" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 41 | - </button> | |
| 42 | - </div> | |
| 43 | - </div> | |
| 44 | - <!--<div class="row"> | |
| 45 | - <div class="col-sm-4" v-if="roomFeeImportDetailInfo.moreCondition == true"> | |
| 46 | - <div class="form-group"> | |
| 47 | - <input type="text" :placeholder="vc.i18n('请输入信息ID','roomFeeImportDetail')" | |
| 48 | - v-model="roomFeeImportDetailInfo.conditions.activitiesId" class=" form-control"> | |
| 49 | - </div> | |
| 50 | - </div> | |
| 51 | - </div>--> | |
| 52 | - </div> | |
| 53 | - </div> | |
| 54 | - </div> | |
| 55 | - </div> | |
| 56 | - <div class="row"> | |
| 57 | - <div class="col-lg-12"> | |
| 58 | - <div class="ibox"> | |
| 59 | - <div class="ibox-title"> | |
| 60 | - <h5> | |
| 61 | - <span><vc:i18n name="导入费用详情" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 62 | - </h5> | |
| 63 | - <div class="ibox-tools" style="top:10px;"> | |
| 64 | - <button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()"> | |
| 65 | - <i class="fa fa-close"></i>返回 | |
| 66 | - </button> | |
| 67 | - </div> | |
| 68 | - </div> | |
| 69 | - <div class="ibox-content"> | |
| 70 | - <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15"> | |
| 71 | - <thead> | |
| 72 | - <tr> | |
| 73 | - <th class="text-center"> | |
| 74 | - <span><vc:i18n name="楼栋编号" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 75 | - </th> | |
| 76 | - <th class="text-center"> | |
| 77 | - <span><vc:i18n name="单元编号" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 78 | - </th> | |
| 79 | - <th class="text-center"> | |
| 80 | - <span><vc:i18n name="房屋编号" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 81 | - </th> | |
| 82 | - <th class="text-center"> | |
| 83 | - <span><vc:i18n name="费用名称" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 84 | - </th> | |
| 85 | - <th class="text-center"> | |
| 86 | - <span><vc:i18n name="开始时间" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 87 | - </th> | |
| 88 | - <th class="text-center"> | |
| 89 | - <span><vc:i18n name="结束时间" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 90 | - </th> | |
| 91 | - <th class="text-center"> | |
| 92 | - <span><vc:i18n name="总金额" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 93 | - </th> | |
| 94 | - <th class="text-center"> | |
| 95 | - <span><vc:i18n name="备注" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 96 | - </th> | |
| 97 | - <th class="text-center"> | |
| 98 | - <span><vc:i18n name="状态" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 99 | - </th> | |
| 100 | - </tr> | |
| 101 | - </thead> | |
| 102 | - <tbody> | |
| 103 | - <tr v-for="detail in roomFeeImportDetailInfo.importFeeDetails"> | |
| 104 | - <td class="text-center">{{detail.floorNum}}</td> | |
| 105 | - <td class="text-center">{{detail.unitNum}}</td> | |
| 106 | - <td class="text-center">{{detail.roomNum}}</td> | |
| 107 | - <td class="text-center">{{detail.feeName}}</td> | |
| 108 | - <td class="text-center">{{detail.startTime}}</td> | |
| 109 | - <td class="text-center">{{detail.endTime}}</td> | |
| 110 | - <td class="text-center">{{detail.amount}}</td> | |
| 111 | - <td class="text-center">{{detail.remark}}</td> | |
| 112 | - <td class="text-center"> | |
| 113 | - <span class="badge badge-success" v-if="detail.state == '1000'"> | |
| 114 | - <span><vc:i18n name="导入成功" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 115 | - </span> | |
| 116 | - <span class="badge badge-danger" v-else> | |
| 117 | - <span><vc:i18n name="导入失败" namespace="roomFeeImportDetail"></vc:i18n></span> | |
| 118 | - </span> | |
| 119 | - </td> | |
| 120 | - </tr> | |
| 121 | - </tbody> | |
| 122 | - <tfoot> | |
| 123 | - <tr> | |
| 124 | - <td colspan="9"> | |
| 125 | - <ul class="pagination float-right"></ul> | |
| 126 | - </td> | |
| 127 | - </tr> | |
| 128 | - </tfoot> | |
| 129 | - </table> | |
| 130 | - <!-- 分页 --> | |
| 131 | - <vc:create path="frame/pagination"></vc:create> | |
| 132 | - </div> | |
| 133 | - </div> | |
| 134 | - </div> | |
| 135 | - </div> | |
| 136 | -</div> | |
| 137 | -``` | |
| 138 | -```js | |
| 139 | -/** | |
| 140 | - 入驻小区 | |
| 141 | - **/ | |
| 142 | -(function (vc) { | |
| 143 | - var DEFAULT_PAGE = 1; | |
| 144 | - var DEFAULT_ROWS = 10; | |
| 145 | - vc.extends({ | |
| 146 | - data: { | |
| 147 | - roomFeeImportDetailInfo: { | |
| 148 | - importFeeDetails: [], | |
| 149 | - total: 0, | |
| 150 | - records: 1, | |
| 151 | - moreCondition: false, | |
| 152 | - conditions: { | |
| 153 | - floorNum: '', | |
| 154 | - unitNum: '', | |
| 155 | - roomNum: '', | |
| 156 | - importFeeId: '' | |
| 157 | - } | |
| 158 | - } | |
| 159 | - }, | |
| 160 | - _initMethod: function () { | |
| 161 | - $that.roomFeeImportDetailInfo.conditions.importFeeId = vc.getParam('importFeeId'); | |
| 162 | - $that._listImportFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS); | |
| 163 | - }, | |
| 164 | - _initEvent: function () { | |
| 165 | - vc.on('pagination', 'page_event', function (_currentPage) { | |
| 166 | - vc.component._listImportFeeDetails(_currentPage, DEFAULT_ROWS); | |
| 167 | - }); | |
| 168 | - }, | |
| 169 | - methods: { | |
| 170 | - _listImportFeeDetails: function (_page, _rows) { | |
| 171 | - vc.component.roomFeeImportDetailInfo.conditions.page = _page; | |
| 172 | - vc.component.roomFeeImportDetailInfo.conditions.row = _rows; | |
| 173 | - vc.component.roomFeeImportDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId; | |
| 174 | - var param = { | |
| 175 | - params: vc.component.roomFeeImportDetailInfo.conditions | |
| 176 | - }; | |
| 177 | - //发送get请求 | |
| 178 | - vc.http.apiGet('/importFee/queryImportFeeDetail', | |
| 179 | - param, | |
| 180 | - function (json, res) { | |
| 181 | - var _roomFeeImportDetailInfo = JSON.parse(json); | |
| 182 | - vc.component.roomFeeImportDetailInfo.total = _roomFeeImportDetailInfo.total; | |
| 183 | - vc.component.roomFeeImportDetailInfo.records = _roomFeeImportDetailInfo.records; | |
| 184 | - vc.component.roomFeeImportDetailInfo.importFeeDetails = _roomFeeImportDetailInfo.data; | |
| 185 | - vc.emit('pagination', 'init', { | |
| 186 | - total: vc.component.roomFeeImportDetailInfo.records, | |
| 187 | - currentPage: _page | |
| 188 | - }); | |
| 189 | - }, function (errInfo, error) { | |
| 190 | - console.log('请求失败处理'); | |
| 191 | - } | |
| 192 | - ); | |
| 193 | - }, | |
| 194 | - _openBillDetail: function () { | |
| 195 | - }, | |
| 196 | - _queryFeeDetailMethod: function () { | |
| 197 | - vc.component._listImportFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS); | |
| 198 | - }, | |
| 199 | - _moreCondition: function () { | |
| 200 | - if (vc.component.roomFeeImportDetailInfo.moreCondition) { | |
| 201 | - vc.component.roomFeeImportDetailInfo.moreCondition = false; | |
| 202 | - } else { | |
| 203 | - vc.component.roomFeeImportDetailInfo.moreCondition = true; | |
| 204 | - } | |
| 205 | - }, | |
| 206 | - _goBack: function () { | |
| 207 | - vc.goBack(); | |
| 208 | - } | |
| 209 | - } | |
| 210 | - }); | |
| 211 | -})(window.vc); | |
| 212 | -``` | |
| 213 | 0 | \ No newline at end of file |
src/views/fee/roomFeeImportList.vue
| ... | ... | @@ -28,7 +28,7 @@ |
| 28 | 28 | <el-card class="table-card"> |
| 29 | 29 | <div slot="header" class="flex justify-between"> |
| 30 | 30 | <span>{{ $t('roomFeeImport.table.title') }}</span> |
| 31 | - <el-button type="primary" style="float: right;" @click="handleImport"> | |
| 31 | + <el-button type="primary" size="small" @click="handleImport"> | |
| 32 | 32 | {{ $t('roomFeeImport.button.import') }} |
| 33 | 33 | </el-button> |
| 34 | 34 | </div> | ... | ... |
src/views/fee/staffFeeManageList.vue
| ... | ... | @@ -35,9 +35,9 @@ |
| 35 | 35 | <el-card> |
| 36 | 36 | <div slot="header" class="flex justify-between"> |
| 37 | 37 | <span>{{ $t('staffFeeManage.list.title') }}</span> |
| 38 | - <el-button type="primary" size="small" class="float-right" @click="handleExport"> | |
| 38 | + <!-- <el-button type="primary" size="small" class="float-right" @click="handleExport"> | |
| 39 | 39 | {{ $t('common.export') }} |
| 40 | - </el-button> | |
| 40 | + </el-button> --> | |
| 41 | 41 | </div> |
| 42 | 42 | <el-table v-loading="loading" :data="tableData" border style="width: 100%"> |
| 43 | 43 | <el-table-column prop="userId" :label="$t('staffFeeManage.table.userCode')" align="center" /> |
| ... | ... | @@ -122,9 +122,6 @@ export default { |
| 122 | 122 | this.pagination.current = 1 |
| 123 | 123 | this.getList() |
| 124 | 124 | }, |
| 125 | - handleExport() { | |
| 126 | - // 导出逻辑 | |
| 127 | - }, | |
| 128 | 125 | handleSizeChange(val) { |
| 129 | 126 | this.pagination.size = val |
| 130 | 127 | this.getList() | ... | ... |
src/views/oa/newOaWorkflowDetailList.vue
src/views/oa/newOaWorkflowList.vue
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | <el-col :span="20"> |
| 24 | 24 | <div class="content-wrapper"> |
| 25 | 25 | <new-oa-workflow-pool v-show="activeTab === 'newOaWorkflowPool'" ref="newOaWorkflowPool" /> |
| 26 | - <new-oa-workflow-form v-if="activeTab === 'newOaWorkflowForm'" ref="newOaWorkflowForm" @switch-tab="switchTab"/> | |
| 26 | + <new-oa-workflow-form v-if="activeTab === 'newOaWorkflowForm'" ref="newOaWorkflowForm" @success="handleFormSuccess"/> | |
| 27 | 27 | <new-oa-workflow-undo v-show="activeTab === 'newOaWorkflowUndo'" ref="newOaWorkflowUndo" /> |
| 28 | 28 | <new-oa-workflow-finish v-show="activeTab === 'newOaWorkflowFinish'" ref="newOaWorkflowFinish" /> |
| 29 | 29 | </div> |
| ... | ... | @@ -69,12 +69,17 @@ export default { |
| 69 | 69 | } |
| 70 | 70 | }, |
| 71 | 71 | switchTab(tab) { |
| 72 | + console.log('父组件 switchTab 被调用,参数 tab:', tab) | |
| 72 | 73 | if (this.activeTab === tab) return |
| 73 | 74 | this.activeTab = tab |
| 74 | 75 | setTimeout(() => { |
| 75 | 76 | this.$refs[tab].open({ flowId: this.flowId }) |
| 76 | 77 | }, 500) |
| 77 | 78 | }, |
| 79 | + handleFormSuccess(targetTab) { | |
| 80 | + console.log('父组件收到 success 事件,目标 tab:', targetTab) | |
| 81 | + this.switchTab(targetTab) | |
| 82 | + } | |
| 78 | 83 | } |
| 79 | 84 | } |
| 80 | 85 | </script> | ... | ... |