diff --git a/src/views/modules/points/pointsintegraladjustmentcheck.vue b/src/views/modules/points/pointsintegraladjustmentcheck.vue
index bbacc22..811dbda 100644
--- a/src/views/modules/points/pointsintegraladjustmentcheck.vue
+++ b/src/views/modules/points/pointsintegraladjustmentcheck.vue
@@ -16,32 +16,39 @@
-
-
-
-
+
+
+ {{scope.$index+1}}
+
+
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
+
{{ $t('update') }}
{{ $t('delete') }}
+ {{ "审核" }}
@@ -54,6 +61,23 @@
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -75,11 +99,51 @@ export default {
},
dataForm: {
id: ''
- }
+ },
+ form: {
+ checkOpinion: '',
+ state: '2',
+ id: ''
+
+ },
+ dialogFormVisible: false
}
},
components: {
AddOrUpdate
- }
+ },
+ methods:{
+ openCheckHandle(id){
+ this.dialogFormVisible = true
+ this.form.id = id
+ this.form.checkOpinion = ''
+ this.form.state = '2'
+ },
+ checkHandle() {
+ // if(this.form.state === ''){
+ // this.$message({
+ // message: '请填写审核意见',
+ // type: 'error',
+ // duration: 1500,
+ // onClose: () => {}
+ // })
+ // return false;
+ // }
+ this.$http['put']('/points/pointsintegraladjustmentcheck/updateCheck', this.form).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.$message({
+ message: this.$t('prompt.success'),
+ type: 'success',
+ duration: 500,
+ onClose: () => {
+ this.dialogFormVisible = false
+ this.getDataList()
+ }
+ })
+ }).catch(() => { })
+ }
+ }
}
diff --git a/src/views/modules/points/userinfo-points-adjust.vue b/src/views/modules/points/userinfo-points-adjust.vue
index ddd7b61..20bddc3 100644
--- a/src/views/modules/points/userinfo-points-adjust.vue
+++ b/src/views/modules/points/userinfo-points-adjust.vue
@@ -45,17 +45,22 @@
-
+
加积分
减积分
+
+
+
+
+
+
-
+
@@ -83,9 +88,13 @@ export default {
mobile: '',
points: '',
adjustReason: '',
- operationType: '',
- operatePoints: ''
- }
+ operationType: 1,
+ operatePoints: '',
+ pointOperateTypeCode: '',
+ pointOperateTypeName: '',
+ state: 1
+ },
+ paramNameArr: []
}
},
computed: {
@@ -116,20 +125,46 @@ export default {
}
},
created () {
+
},
methods: {
init () {
this.visible = true
+ this.getParamListInfo()
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.getInfo()
this.dataForm.adjustReason = ''
- this.dataForm.operationType = ''
+ this.dataForm.operationType = 1
this.dataForm.operatePoints = ''
+ this.dataForm.pointOperateTypeCode = ''
}
})
},
+ // 参数名称取值变化事件
+ selectModel (id) {
+ this.paramNameArr.find((item) => {
+ if (item.adjustmentTypeCode === id) {
+ this.dataForm.operatePoints = item.point
+ this.dataForm.pointOperateTypeName = item.adjustmentTypeName
+ }
+ })
+ },
+ // 单选框取值变化事件
+ radioChange(){
+ this.dataForm.operatePoints = 0
+ this.dataForm.pointOperateTypeCode = ''
+ },
+ // 获取参数名称code下拉信息
+ getParamListInfo () {
+ this.$http.get(`/points/pointsadjustmenttype/getPointsTypeList`).then(({ data: res }) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+ this.paramNameArr = res.data
+ }).catch(() => {})
+ },
getInfo () {
this.$http.get(`/app-user/user/${this.dataForm.id}`).then(({ data: res }) => {
if (res.code !== 0) {
@@ -139,6 +174,10 @@ export default {
...this.dataForm,
...res.data
}
+ // userId 赋值
+ this.dataForm.userId = this.dataForm.id
+ this.dataForm.id = ''
+ this.dataForm.state = 1
}).catch(() => { })
},
dataFormSubmitHandle: debounce(function () {
@@ -146,8 +185,17 @@ export default {
if (!valid) {
return false
}
- this.$http['post'](
- '/points/pointslogs/confirmUserAdjustPoint', this.dataForm).then(({ data: res }) => {
+ if(this.dataForm.operatePoints === 0){
+ this.$message({
+ message: '调整积分不能为0',
+ type: 'error',
+ duration: 1500,
+ onClose: () => {}
+ })
+ return false;
+ }
+ console.log(this.dataForm)
+ this.$http['post']('/points/pointsintegraladjustmentcheck', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}