党员积分
This commit is contained in:
@@ -5,11 +5,13 @@
|
||||
<div class="label">
|
||||
<span class="tips">*</span>积分类型
|
||||
</div>
|
||||
<div class="value" @click="showTypeSelect=true">{{typeName}}<u-icon name="arrow-right" color="#ddd" size="24" style="margin-left: 4px" ></u-icon></div>
|
||||
<div class="value">{{integralRuleName}}
|
||||
<!-- <u-icon name="arrow-right" color="#ddd" size="24" style="margin-left: 4px" ></u-icon> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-area">
|
||||
<div class="title"><span class="tips">*</span>申请描述</div>
|
||||
<u-input v-model="value" type="textarea" :height="200" placeholder="请输入描述信息" placeholder-style="font-size:20px;color:#999;" maxlength="500" />
|
||||
<u-input v-model="description" type="textarea" :height="200" placeholder="请输入描述信息" placeholder-style="font-size:20px;color:#999;" maxlength="500" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload">
|
||||
@@ -21,7 +23,7 @@
|
||||
<div class="footer" @click="confirmAdd">
|
||||
<div class="btn">提交</div>
|
||||
</div>
|
||||
<u-select v-model="showTypeSelect" :list="typeList" @confirm="confirmType" value-name="id" label-name="name"></u-select>
|
||||
<u-select v-model="showTypeSelect" :list="typeList" @confirm="confirmType" value-name="id" label-name="eventName"></u-select>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -35,27 +37,33 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
description: '',
|
||||
fileList: [],
|
||||
typeId: '',
|
||||
typeName: '',
|
||||
typeList: [{id: '1', name: '111'}, {id: '2', name: '222'}],
|
||||
integralRuleId: '',
|
||||
integralRuleName: '',
|
||||
|
||||
typeList: [],
|
||||
showTypeSelect: false
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
if(options.id) {
|
||||
this.typeId = options.id
|
||||
this.typeName = options.name
|
||||
}
|
||||
this.integralRuleId = options.integralRuleId
|
||||
this.integralRuleName = options.integralRuleName
|
||||
},
|
||||
methods: {
|
||||
confirmAdd() {
|
||||
if(!this.value) {
|
||||
if(!this.description) {
|
||||
this.$u.toast('请输入申请描述')
|
||||
}
|
||||
this.$instance.post(`/app/partyOrganization/queryPartyOrganizationListByName`).then((res) => {
|
||||
if(res?.data) {
|
||||
var params = {
|
||||
integralRuleId: this.integralRuleId,
|
||||
integralRuleName: this.integralRuleName,
|
||||
description: this.description,
|
||||
files: this.fileList,
|
||||
partyId: this.user.partyId
|
||||
}
|
||||
this.$instance.post(`/app/apppartyintegraldeclare/addOrUpdate`, params).then((res) => {
|
||||
if(res.code == 0) {
|
||||
this.$u.toast('申请成功')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
@@ -64,9 +72,16 @@ export default {
|
||||
})
|
||||
},
|
||||
confirmType(e) {
|
||||
this.typeId = e[0].value
|
||||
this.typeName = e[0].label
|
||||
}
|
||||
this.integralRuleId = e[0].value
|
||||
this.integralRuleName = e[0].label
|
||||
},
|
||||
getTypeList() {
|
||||
this.$instance.post(`/app/apppartyintegralrule/list?classify=0&size=1000`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.typeList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user