This commit is contained in:
花有清香月有阴
2022-01-06 19:42:27 +08:00
parent cd399357be
commit 701ee0f15a
3 changed files with 66 additions and 15 deletions

View File

@@ -22,16 +22,14 @@
<u-input v-model="forms.status" placeholder="请选择转交对象" @click="toSelectUser" disabled /> <u-input v-model="forms.status" placeholder="请选择转交对象" @click="toSelectUser" disabled />
<AiTreePicker :ops="treeList" v-model="forms.status" @select="handerSelect"> </AiTreePicker> <AiTreePicker :ops="treeList" v-model="forms.status" @select="handerSelect"> </AiTreePicker>
<div :style="{ color: form.postFunction ? '' : '#c0c4cc' }" v-text="form.postFunction || '请选择岗位'" />
</u-form-item> --> </u-form-item> -->
</u-form> </u-form>
</div> </div>
<div class="btn" @click="submit"> <div class="btn">
<span v-if="this.number == 1">转交事件</span> <span v-if="this.number == 1">转交事件</span>
<span v-if="this.number == 2">拒绝受理</span> <span v-if="this.number == 2" @click="submit2">拒绝受理</span>
<span v-if="this.number == 3">我来受理</span> <span v-if="this.number == 3" @click="submit3">我来受理</span>
</div> </div>
</div> </div>
</template> </template>
@@ -72,7 +70,11 @@ export default {
this.typeList() this.typeList()
}, },
methods: { methods: {
submit() { // 拒绝 /app/appclapeventinfo/finishByGirdMember
// 同意 /app/appclapeventinfo/finishByManager
// 拒绝
submit2() {
if (this.flag) return if (this.flag) return
this.$refs.uForm.validate((valid) => { this.$refs.uForm.validate((valid) => {
@@ -96,17 +98,67 @@ export default {
this.flag = true this.flag = true
this.$http this.$http
.post(this.number == 2 ? '/app/appclapeventinfo/finishByGirdMember' : '/app/appclapeventinfo/finishByManager', { .post('/app/appclapeventinfo/finishByManager', {
groupName: this.forms.groupName, groupName: this.forms.groupName,
groupId: this.forms.groupId, groupId: this.forms.groupId,
content: this.forms.content, content: this.forms.content,
fileIds: imgs || [], 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.number == 2 || this.number == 3) {
if (!this.forms.groupName) {
return this.$u.toast('请选择事件分类')
}
if (!this.forms.content) {
return this.$u.toast(this.number == 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, id: this.id,
}) })
.then((res) => { .then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.$u.toast('受理成功') this.$u.toast('受理成功')
this.flag = false this.flag = false
this.forms = {}
uni.$emit('nextList') uni.$emit('nextList')
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()

View File

@@ -113,11 +113,8 @@
<div class="doIt" @click="doItShow = true">我来受理</div> <div class="doIt" @click="doItShow = true">我来受理</div>
</div> </div>
<!-- v-if="data.eventStatus == 0" -->
<div class="endDoIt" v-if="data.eventStatus == 1" @click="toContent(3)">我已办结</div> <div class="endDoIt" v-if="data.eventStatus == 1" @click="toContent(3)">我已办结</div>
<!-- <div class="endDoIt" v-if="data.eventStatus == 3">我已办结</div> -->
</div> </div>
<u-modal v-model="doItShow" :mask-close-able="true" z-index="99" content="确定受理该事件?" :show-cancel-button="true" @confirm="doThings"></u-modal> <u-modal v-model="doItShow" :mask-close-able="true" z-index="99" content="确定受理该事件?" :show-cancel-button="true" @confirm="doThings"></u-modal>

View File

@@ -90,14 +90,15 @@ export default {
}, },
}, },
mounted() { mounted() {
this.current = 1
this.girdList()
this.getList()
},
created() {
this.$dict.load('clapEventStatus').then(() => { this.$dict.load('clapEventStatus').then(() => {
this.getList() this.getList()
this.listType = this.$dict.getDict('clapEventStatus') this.listType = this.$dict.getDict('clapEventStatus')
}) })
this.current = 1
this.girdList()
this.getList()
}, },
methods: { methods: {
getList() { getList() {
@@ -115,6 +116,7 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages this.pages = res.data.pages
this.$forceUpdate()
} }
}) })
}, },