v1.9 优化OA测试bug 优化

This commit is contained in:
wuxw 2025-10-22 11:17:34 +08:00
parent 274e44b593
commit 13f457c98e
7 changed files with 17 additions and 224 deletions

View File

@ -213,11 +213,14 @@ export default {
if (res.code === 0) {
this.$message.success(this.$t('common.operationSuccess'))
this.resetForm()
this.$emit('switch-tab', 'newOaWorkflowPool')
console.log('子组件准备发出 success 事件', 'newOaWorkflowUndo')
this.$emit('success', 'newOaWorkflowUndo')
console.log('子组件已发出 success 事件')
} else {
this.$message.error(res.msg || this.$t('common.submitFailed'))
}
} catch (error) {
console.log('提交表单失败,错误信息:', error)
if (error.message) {
//
return
@ -249,7 +252,7 @@ export default {
resetForm() {
this.$refs.form.resetFields()
if (this.$refs.uploadFile) {
if (this.$refs.uploadFile && this.$refs.uploadFile.clear) {
this.$refs.uploadFile.clear()
}
this.fileName = ''

View File

@ -1,212 +0,0 @@
```html
<div class=" animated fadeInRight ecommerce">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>
<span><vc:i18n name="查询条件" namespace="roomFeeImportDetail"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
v-on:click="_moreCondition()">
{{roomFeeImportDetailInfo.moreCondition == true?'隐藏':'更多'}}
</button>
</div>
</div>
<div class="ibox-content">
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入楼栋编号','roomFeeImportDetail')"
v-model="roomFeeImportDetailInfo.conditions.floorNum" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入单元编号','roomFeeImportDetail')"
v-model="roomFeeImportDetailInfo.conditions.unitNum" class=" form-control">
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入房屋编号','roomFeeImportDetail')"
v-model="roomFeeImportDetailInfo.conditions.roomNum" class=" form-control">
</div>
</div>
<div class="col-sm-2">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFeeDetailMethod()">
<i class="fa fa-search"></i>
<span><vc:i18n name="查询" namespace="roomFeeImportDetail"></vc:i18n></span>
</button>
</div>
</div>
<!--<div class="row">
<div class="col-sm-4" v-if="roomFeeImportDetailInfo.moreCondition == true">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入信息ID','roomFeeImportDetail')"
v-model="roomFeeImportDetailInfo.conditions.activitiesId" class=" form-control">
</div>
</div>
</div>-->
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div class="ibox">
<div class="ibox-title">
<h5>
<span><vc:i18n name="导入费用详情" namespace="roomFeeImportDetail"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_goBack()">
<i class="fa fa-close"></i>返回
</button>
</div>
</div>
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="楼栋编号" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="单元编号" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="房屋编号" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="费用名称" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="开始时间" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="结束时间" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="总金额" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="备注" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="状态" namespace="roomFeeImportDetail"></vc:i18n></span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="detail in roomFeeImportDetailInfo.importFeeDetails">
<td class="text-center">{{detail.floorNum}}</td>
<td class="text-center">{{detail.unitNum}}</td>
<td class="text-center">{{detail.roomNum}}</td>
<td class="text-center">{{detail.feeName}}</td>
<td class="text-center">{{detail.startTime}}</td>
<td class="text-center">{{detail.endTime}}</td>
<td class="text-center">{{detail.amount}}</td>
<td class="text-center">{{detail.remark}}</td>
<td class="text-center">
<span class="badge badge-success" v-if="detail.state == '1000'">
<span><vc:i18n name="导入成功" namespace="roomFeeImportDetail"></vc:i18n></span>
</span>
<span class="badge badge-danger" v-else>
<span><vc:i18n name="导入失败" namespace="roomFeeImportDetail"></vc:i18n></span>
</span>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="9">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->
<vc:create path="frame/pagination"></vc:create>
</div>
</div>
</div>
</div>
</div>
```
```js
/**
入驻小区
**/
(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
roomFeeImportDetailInfo: {
importFeeDetails: [],
total: 0,
records: 1,
moreCondition: false,
conditions: {
floorNum: '',
unitNum: '',
roomNum: '',
importFeeId: ''
}
}
},
_initMethod: function () {
$that.roomFeeImportDetailInfo.conditions.importFeeId = vc.getParam('importFeeId');
$that._listImportFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
},
_initEvent: function () {
vc.on('pagination', 'page_event', function (_currentPage) {
vc.component._listImportFeeDetails(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listImportFeeDetails: function (_page, _rows) {
vc.component.roomFeeImportDetailInfo.conditions.page = _page;
vc.component.roomFeeImportDetailInfo.conditions.row = _rows;
vc.component.roomFeeImportDetailInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
var param = {
params: vc.component.roomFeeImportDetailInfo.conditions
};
//发送get请求
vc.http.apiGet('/importFee/queryImportFeeDetail',
param,
function (json, res) {
var _roomFeeImportDetailInfo = JSON.parse(json);
vc.component.roomFeeImportDetailInfo.total = _roomFeeImportDetailInfo.total;
vc.component.roomFeeImportDetailInfo.records = _roomFeeImportDetailInfo.records;
vc.component.roomFeeImportDetailInfo.importFeeDetails = _roomFeeImportDetailInfo.data;
vc.emit('pagination', 'init', {
total: vc.component.roomFeeImportDetailInfo.records,
currentPage: _page
});
}, function (errInfo, error) {
console.log('请求失败处理');
}
);
},
_openBillDetail: function () {
},
_queryFeeDetailMethod: function () {
vc.component._listImportFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
},
_moreCondition: function () {
if (vc.component.roomFeeImportDetailInfo.moreCondition) {
vc.component.roomFeeImportDetailInfo.moreCondition = false;
} else {
vc.component.roomFeeImportDetailInfo.moreCondition = true;
}
},
_goBack: function () {
vc.goBack();
}
}
});
})(window.vc);
```

View File

@ -28,7 +28,7 @@
<el-card class="table-card">
<div slot="header" class="flex justify-between">
<span>{{ $t('roomFeeImport.table.title') }}</span>
<el-button type="primary" style="float: right;" @click="handleImport">
<el-button type="primary" size="small" @click="handleImport">
{{ $t('roomFeeImport.button.import') }}
</el-button>
</div>

View File

@ -35,9 +35,9 @@
<el-card>
<div slot="header" class="flex justify-between">
<span>{{ $t('staffFeeManage.list.title') }}</span>
<el-button type="primary" size="small" class="float-right" @click="handleExport">
<!-- <el-button type="primary" size="small" class="float-right" @click="handleExport">
{{ $t('common.export') }}
</el-button>
</el-button> -->
</div>
<el-table v-loading="loading" :data="tableData" border style="width: 100%">
<el-table-column prop="userId" :label="$t('staffFeeManage.table.userCode')" align="center" />
@ -122,9 +122,6 @@ export default {
this.pagination.current = 1
this.getList()
},
handleExport() {
//
},
handleSizeChange(val) {
this.pagination.size = val
this.getList()

View File

@ -185,7 +185,7 @@ export default {
comments: [],
action: '',
audit: {
auditCode: '1100',
auditCode: '',
auditMessage: '',
staffId: '',
staffName: '',

View File

@ -23,7 +23,7 @@
<el-col :span="20">
<div class="content-wrapper">
<new-oa-workflow-pool v-show="activeTab === 'newOaWorkflowPool'" ref="newOaWorkflowPool" />
<new-oa-workflow-form v-if="activeTab === 'newOaWorkflowForm'" ref="newOaWorkflowForm" @switch-tab="switchTab"/>
<new-oa-workflow-form v-if="activeTab === 'newOaWorkflowForm'" ref="newOaWorkflowForm" @success="handleFormSuccess"/>
<new-oa-workflow-undo v-show="activeTab === 'newOaWorkflowUndo'" ref="newOaWorkflowUndo" />
<new-oa-workflow-finish v-show="activeTab === 'newOaWorkflowFinish'" ref="newOaWorkflowFinish" />
</div>
@ -69,12 +69,17 @@ export default {
}
},
switchTab(tab) {
console.log('父组件 switchTab 被调用,参数 tab:', tab)
if (this.activeTab === tab) return
this.activeTab = tab
setTimeout(() => {
this.$refs[tab].open({ flowId: this.flowId })
}, 500)
},
handleFormSuccess(targetTab) {
console.log('父组件收到 success 事件,目标 tab:', targetTab)
this.switchTab(targetTab)
}
}
}
</script>

View File

@ -44,8 +44,8 @@ export default {
logo: '',
companyName:'',
loginForm: {
username: 'wuxw',
passwd: 'admin',
username: '',
passwd: '',
validateCode: ''
},
captchaUrl: '',