|
@@ -33,23 +33,34 @@
|
|
|
</el-button>
|
|
|
<el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
|
|
|
</template>
|
|
|
+ <template slot-scope="scope" slot="menu">
|
|
|
+ <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
|
|
|
+ @click.stop="statusfun(scope.row.id,0)">
|
|
|
+ 启用
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
|
|
|
+ @click.stop="statusfun(scope.row.id,1)">
|
|
|
+ 停用
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<template slot="unitNoForm">
|
|
|
- <search-query ref="SearchQuery" :datalist="unitNoData" title="计量单位" :filterable="true" :clearable="true"
|
|
|
+ <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.unitNo" :datalist="unitNoData" title="计量单位" :filterable="true" :clearable="true"
|
|
|
:remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
|
|
|
@remoteMethod="getBunitsListfun" @corpChange="unitNoCorpChange">
|
|
|
<bunits></bunits>
|
|
|
</search-query>
|
|
|
</template>
|
|
|
<template slot="curNoForm">
|
|
|
- <search-query ref="SearchQuery" :datalist="curNoData" title="币别" :filterable="true" :clearable="true"
|
|
|
+ <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.curNo" :datalist="curNoData" title="币别" :filterable="true" :clearable="true"
|
|
|
:remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
|
|
|
@remoteMethod="getRateListfun" @corpChange="curNoCorpChange">
|
|
|
<rateManagement></rateManagement>
|
|
|
</search-query>
|
|
|
</template>
|
|
|
<template slot="feesTypeNameForm">
|
|
|
- <search-query ref="SearchQuery" :datalist="feesTypeData" title="费用类别" :filterable="true" :clearable="true"
|
|
|
- :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'id' }"
|
|
|
+ <search-query ref="SearchQuery" :disabled="searchDisabled" :selectValue="form.feesTypeName" :datalist="feesTypeData" title="费用类别"
|
|
|
+ :filterable="true" :clearable="true"
|
|
|
+ :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
|
|
|
@remoteMethod="bfeesdefineListfun" @corpChange="feesTypeCorpChange">
|
|
|
<bfeesdetype></bfeesdetype>
|
|
|
</search-query>
|
|
@@ -127,6 +138,8 @@ export default {
|
|
|
components: { bunits, bfeesdetype, rateManagement, SearchQuery },
|
|
|
data() {
|
|
|
return {
|
|
|
+ // 是否禁用
|
|
|
+ searchDisabled:false,
|
|
|
// 类别弹窗的开启
|
|
|
corpTypeVisible: false,
|
|
|
// 费用类别数据
|
|
@@ -188,7 +201,8 @@ export default {
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
|
- total: 0
|
|
|
+ total: 0,
|
|
|
+ ageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
|
|
|
},
|
|
|
selectionList: [],
|
|
|
option: {
|
|
@@ -212,6 +226,7 @@ export default {
|
|
|
viewBtn: true,
|
|
|
selection: true,
|
|
|
dialogClickModal: false,
|
|
|
+ menuWidth:260,
|
|
|
column: [
|
|
|
// {
|
|
|
// label: "凭证",
|
|
@@ -463,6 +478,26 @@ export default {
|
|
|
this.getRateListfun()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 禁用启用按钮
|
|
|
+ statusfun(id,status){
|
|
|
+ this.$confirm("确定将选择数据更改状态?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(()=>{
|
|
|
+ bfeesDetail(id).then(res=>{
|
|
|
+ let obj = res.data.data;
|
|
|
+ obj.status = status
|
|
|
+ bfeesSubmit(obj).then(()=>{
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 导出
|
|
|
handleExport() {
|
|
|
var condition = ''
|
|
@@ -533,7 +568,7 @@ export default {
|
|
|
// 费用信息选中回调
|
|
|
feesTypeCorpChange(value) {
|
|
|
this.feesTypeData.map(item => {
|
|
|
- if (item.id == value) {
|
|
|
+ if (item.cnName == value) {
|
|
|
this.form.feesTypeId = item.id
|
|
|
this.form.feesTypeName = item.cnName
|
|
|
}
|
|
@@ -638,6 +673,11 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
beforeOpen(done, type) {
|
|
|
+ if (["edit", "add"].includes(type)) {
|
|
|
+ this.searchDisabled = false
|
|
|
+ } else {
|
|
|
+ this.searchDisabled = true
|
|
|
+ }
|
|
|
if (["edit", "view"].includes(type)) {
|
|
|
bfeesDetail(this.form.id).then(res => {
|
|
|
this.form = res.data.data;
|