-
积分类别
-
-
+
积分类别
+
{{ $dict.getLabel('atWillReportType',data.auditIntegralType) || '请选择' }}
-
-
积分事项
-
-
{{ form.auditIntegralType || '请选择' }}
+
+
积分事项
+
+ {{ data.ruleName || '请选择' }}
-
积分方式
-
+20
+
积分方式
+
{{ data.integral }}
@@ -63,8 +62,9 @@
-
+
+
@@ -126,9 +126,14 @@ export default {
reason: '',
form: {},
data: {
+ id: '',
auditIntegralType: '',
- auditOpinion: '',
- }
+ // auditIntegralName: '',
+ auditOpinion: '', // 不通过理由
+ ruleName: '',
+ integral: ''
+ },
+ typeList: [],
}
},
onLoad(o) {
@@ -142,16 +147,47 @@ export default {
getDetail() {
this.$http.post(`/app/appvillagerintegraldeclare/queryDetailById?id=${this.id}`).then(res => {
if(res.code==0) {
- this.form = this.current > 1? [...this.form, ...res.data] : res.data
+ this.form = res.data
this.$forceUpdate()
}
})
},
+ getType() {
+ if(!this.data.auditIntegralType) {
+ return this.$u.toast('请选择积分类别')
+ } else {
+ this.isShowOption=true
+ this.$http.post(`/app/appvillagerintegralrule/list?current=1&size=10&auditIntegralType=${this.data.auditIntegralType}`).then(res=>{
+ if(res.code == 0){
+ this.typeList = res.data.records
+ // this.data.id = res.data.records.id
+ }
+ })
+ }
+ },
+ typeChange(e) {
+ // console.log(e);
+ this.data.ruleName = e[0].label
+ this.data.integral = e[0].value
+ },
integralType(e) {
- console.log(e);
- this.data.auditIntegralType = e[0].label
+ // this.data.auditIntegralName = e[0].label
+ this.data.auditIntegralType = e[0].value
},
submit() {
+ if(this.opts==1){
+ if(!this.data.auditIntegralType) {
+ return this.$u.toast('请选择积分类别')
+ }
+ if(!this.data.ruleName) {
+ return this.$u.toast('请选择积分事项')
+ }
+ }
+ if(this.opts==0){
+ if(!this.data.auditOpinion) {
+ return this.$u.toast('请输入不通过理由')
+ }
+ }
this.$http.post('/app/appvillagerintegraldeclare/examine',null,{
params: {
id: this.id,
@@ -160,6 +196,9 @@ export default {
}
}).then(res=>{
console.log(res);
+ this.$u.toast('保存成功')
+ }).catch(err=>{
+ console.log(err);
})
}
},
@@ -275,10 +314,20 @@ export default {
background: #FFFFFF;
.integral-item {
+ width: 100%;
display: flex;
justify-content: space-between;
+ box-sizing: border-box;
padding: 34px 0;
border-bottom: 1px solid #D8DDE6;
+
+ .label {
+ width: 30%;
+ }
+ .value {
+ width: 70%;
+ text-align: right;
+ }
}
.integral-item:last-child {
@@ -338,7 +387,6 @@ export default {
}
-
.saveBtn {
position: fixed;
bottom: 0;