+
拒绝受理
-
@@ -52,12 +50,14 @@ export default {
groupId: '',
content: '',
files: [],
+ name: ''
},
flag: false,
show: false,
status: '', //1转交 2拒绝受理 3我已办结
myList: [],
id: '',
+ selectUser: {}
}
},
onLoad(option) {
@@ -66,135 +66,85 @@ export default {
this.forms.groupId = option.groupId
this.forms.groupName = option.groupName
this.typeList()
+ uni.$on('goback', (res) => {
+ this.selectUser = res
+ if(res.name) {
+ this.forms.name = res.name
+ }else{
+ this.forms.name = res.girdName
+ }
+ })
},
methods: {
- // 拒绝 /app/appclapeventinfo/finishByManager
- // 同意 /app/appclapeventinfo/finishByGirdMember
-
- // 拒绝
- submit2() {
- if (this.flag) return
-
- this.$refs.uForm.validate((valid) => {
- if (valid) {
- if (this.status == 2 || this.status == 3) {
- if (!this.forms.groupName) {
- return this.$u.toast('请选择事件分类')
- }
-
- if (!this.forms.content) {
- return this.$u.toast(this.status == 2 ? '请输入拒绝受理意见' : '请输入你的办结意见')
- }
- }
-
- const imgs = []
- if (this.forms.files) {
- this.forms.files.map((e) => {
- imgs.push({ url: e.url, id: e.id })
- })
- }
-
- this.flag = true
- this.$http
- .post('/app/appclapeventinfo/refuse', {
- groupName: this.forms.groupName,
- groupId: this.forms.groupId,
- content: this.forms.content,
- files: imgs || [],
- id: this.id,
- })
- .then((res) => {
- if (res.code == 0) {
- this.$u.toast('受理成功')
- this.forms = {}
- this.flag = false
- uni.$emit('nextList')
- setTimeout(() => {
- uni.navigateBack()
- }, 600)
- }
- })
- } else {
- this.$u.toast('失败')
- }
- })
- },
-
- // 同意
- submit3() {
- if (this.flag) return
-
- this.$refs.uForm.validate((valid) => {
- if (valid) {
- if (this.status == 2 || this.status == 3) {
- if (!this.forms.groupName) {
- return this.$u.toast('请选择事件分类')
- }
-
- if (!this.forms.content) {
- return this.$u.toast(this.status == 2 ? '请输入拒绝受理意见' : '请输入你的办结意见')
- }
- }
-
- const imgs = []
- if (this.forms.files) {
- this.forms.files.map((e) => {
- imgs.push({ url: e.url, id: e.id })
- })
- }
-
- this.flag = true
- this.$http
- .post('/app/appclapeventinfo/finishByGirdMember', {
- groupName: this.forms.groupName,
- groupId: this.forms.groupId,
- content: this.forms.content,
- files: imgs || [],
- id: this.id,
- })
- .then((res) => {
- if (res.code == 0) {
- this.$u.toast('受理成功')
- this.flag = false
- this.forms = {}
- uni.$emit('nextList')
- setTimeout(() => {
- uni.navigateBack()
- }, 600)
- }
- })
- } else {
- this.$u.toast('失败')
- }
- })
- },
typeList() {
- this.$http
- .post(`/app/appclapeventgroup/list`, null, {
- params: {
- size: 9999,
- },
- })
- .then((res) => {
- if (res.code == 0) {
- this.myList = res.data.records
- this.$forceUpdate()
- }
- })
+ this.$http.post(`/app/appclapeventgroup/list`, null, {
+ params: {
+ size: 9999,
+ },
+ })
+ .then((res) => {
+ if (res.code == 0) {
+ this.myList = res.data.records
+ this.$forceUpdate()
+ }
+ })
},
- selectStatus(e) {
- console.log(e)
- if (this.show) {
- this.forms.groupName = e[0].label
- this.forms.groupId = e[0].value
- } else {
+ confirm() {
+ if(this.status == 1 && !this.forms.name) {
+ return this.$u.toast('请选择转交对象')
}
+ if(this.status != 1 && !this.forms.groupName) {
+ return this.$u.toast('请选择分类')
+ }
+ if(this.status != 1 && !this.forms.content) {
+ return this.$u.toast('请输入意见')
+ }
+ this.submit()
+ },
+ submit() { //status 1转交 2拒绝受理 3我已办结
+ var url = '', successText= '', params= ''
+ if(this.status == 1) {
+ url = `/app/appclapeventinfo/transfer`
+ successText = '转交成功'
+ params = {
+ ...this.forms,
+ girdId: this.selectUser.id,
+ girdName: this.selectUser.girdName,
+ }
+ if(this.selectUser.name) { //选择的网格员
+ this.params.girdId = this.selectUser.girdId
+ this.params.girdMemberId = this.selectUser.id
+ this.params.girdMemberName = this.selectUser.name
+ }
+ }
+ if(this.status == 2) {
+ url = `/app/appclapeventinfo/refuse`
+ successText = '拒绝成功'
+ params = {...this.forms}
+ }
+ if(this.status == 3) {
+ url = `/app/appclapeventinfo/finishByGirdMember`
+ successText = '办结成功'
+ params = {...this.forms}
+ }
+ params.id = this.id
+ this.$http.post(url, params).then((res) => {
+ if (res.code == 0) {
+ this.$u.toast(successText)
+ uni.$emit('updateDeatil')
+ uni.$emit('getListInit')
+ setTimeout(() => {
+ uni.navigateBack()
+ },600)
+ }
+ })
+ },
+ selectStatus(e) {
+ this.forms.groupName = e[0].label
+ this.forms.groupId = e[0].value
},
-
- handerSelect() {},
-
toSelectUser() {
uni.navigateTo({ url: './SelectUser' })
},
diff --git a/src/apps/AppHandSnapshot/Detail.vue b/src/apps/AppHandSnapshot/Detail.vue
index e16e15a5..aae9918e 100644
--- a/src/apps/AppHandSnapshot/Detail.vue
+++ b/src/apps/AppHandSnapshot/Detail.vue
@@ -114,7 +114,7 @@
我来受理