|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button :type="disabled?'':btnType" size="mini" :disabled="disabled" @click="open" :showClose="false">{{btnTitle}}</el-button>
|
|
|
+ <el-button :type="disabled?'':btnType" :size="btnSize?btnSize:'mini'" :disabled="disabled" @click="open" :showClose="false">{{btnTitle}}</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -17,7 +17,10 @@ export default {
|
|
|
idName:String,
|
|
|
paramContent:Object,
|
|
|
disabled:Boolean,
|
|
|
- statusData:String
|
|
|
+ statusData:String,
|
|
|
+ isBatch:Boolean,
|
|
|
+ selectList:Array,
|
|
|
+ btnSize:String
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
|
@@ -46,18 +49,27 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
async onSubmit(){
|
|
|
- if (this.btnTitle == '暂缓' || this.btnTitle == '取消暂缓' || this.btnTitle == '终止' || this.btnTitle == '恢复'){
|
|
|
- this.param.id = this.paramId
|
|
|
- this.param.content = {
|
|
|
- sa_customersids: [this.$route.query.id],
|
|
|
- status: this.statusData
|
|
|
+ if (this.isBatch){
|
|
|
+ let content = {
|
|
|
+ [this.idName]:this.selectList
|
|
|
}
|
|
|
- }else {
|
|
|
this.param.id = this.paramId
|
|
|
- this.param.content = {
|
|
|
- [this.idName]:this.$route.query.id
|
|
|
+ this.param.content = content
|
|
|
+ }else {
|
|
|
+ if (this.btnTitle == '暂缓' || this.btnTitle == '取消暂缓' || this.btnTitle == '终止' || this.btnTitle == '恢复'){
|
|
|
+ this.param.id = this.paramId
|
|
|
+ this.param.content = {
|
|
|
+ sa_customersids: [this.$route.query.id],
|
|
|
+ status: this.statusData
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ this.param.id = this.paramId
|
|
|
+ this.param.content = {
|
|
|
+ [this.idName]:this.$route.query.id
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
const res = await this.$api.requested(this.param)
|
|
|
this.tool.showMessage(res,()=>{
|
|
|
this.$emit('onSuccess')
|