diff --git a/src/apps/AppPartyPoints/Add.vue b/src/apps/AppPartyPoints/Add.vue index 0e1b931b..5356a7aa 100644 --- a/src/apps/AppPartyPoints/Add.vue +++ b/src/apps/AppPartyPoints/Add.vue @@ -5,8 +5,9 @@ *党员信息
- 请选择 - + + +
@@ -14,8 +15,7 @@ *积分操作
- 请选择 - +
@@ -23,7 +23,7 @@ *积分分值
- +
@@ -32,10 +32,10 @@
- -
{{ value.length }}/500
+ +
{{ form.remark.length }}/500
- @@ -48,22 +48,58 @@ export default { name: 'Add', data() { return { - value: '' + form: { + partyName: '', + partyId: '', + integralType: '', + integral: '', + remark: '', + }, } }, computed: { ...mapState(['user']), - }, created() { - this.$dict.load('appSpecialTypeFive') + this.$dict.load('partyIntegralType') }, onShow() { document.title = '积分调整' - }, methods: { - + rules() { + return { + partyId: '请选择党员信息', + integralType: '请选择积分操作', + integral: '请输入积分分值', + remark: '请输入调整说明', + } + }, + confirm() { + const rules = this.rules() + for (let v of Object.keys(rules)) { + if (!this.form[v]) { + return this.$u.toast(rules[v]) + } + } + this.$http.post('/app/apppartyintegralinfo/add', { + partyIntegralList: [{...this.form}], + }).then(res => { + if (res.code == 0) { + this.$u.toast('提交成功') + uni.$emit('reload') + uni.navigateBack({ + delta: 1 + }) + } + }).catch((err) => { + this.$u.toast(err) + }) + }, + handlePartySelect(e) { + this.form.partyId = e[0].id + this.form.partyName = e[0].name + } }, } diff --git a/src/apps/AppPartyPoints/AppPartyPoints.vue b/src/apps/AppPartyPoints/AppPartyPoints.vue index c3a10630..61f6682c 100644 --- a/src/apps/AppPartyPoints/AppPartyPoints.vue +++ b/src/apps/AppPartyPoints/AppPartyPoints.vue @@ -1,25 +1,19 @@