考核任务完成
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AiBottomBtn">
|
<section class="AiBottomBtn">
|
||||||
<slot v-if="$slots.default"/>
|
<div class="transport" v-if="$slots.default">
|
||||||
|
<slot/>
|
||||||
|
</div>
|
||||||
<u-gap v-else height="112"/>
|
<u-gap v-else height="112"/>
|
||||||
<div class="fixed" @click="$emit('click')">
|
<div class="fixed" @click="$emit('click')">
|
||||||
<slot v-if="$slots.default"/>
|
<slot v-if="$slots.default"/>
|
||||||
@@ -36,5 +38,9 @@ export default {
|
|||||||
background: #1365DD;
|
background: #1365DD;
|
||||||
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
|
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.transport {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleDetail(item) {
|
handleDetail(item) {
|
||||||
const {taskId, taskDetailId} = item
|
const {taskId, taskDetailId} = item
|
||||||
uni.navigateTo({url: this.$qs.stringifyUrl({url: "./rsDetail", query: {taskId, taskDetailId}})})
|
uni.navigateTo({url: this.$qs.stringifyUrl({url: "./rsDetail", query: {taskId, taskDetailId,approve:+(this.search.type==2)}})})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
@@ -15,19 +15,24 @@
|
|||||||
</AiItem>
|
</AiItem>
|
||||||
</template>
|
</template>
|
||||||
</AiGroup>
|
</AiGroup>
|
||||||
<AiBottomBtn text="提交" @click="submit"/>
|
<AiBottomBtn>
|
||||||
|
<div flex>
|
||||||
|
<div class="fill reject" @click="handleReject">审批拒绝</div>
|
||||||
|
<div class="fill text" @click="handlePass">审批通过</div>
|
||||||
|
</div>
|
||||||
|
</AiBottomBtn>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DynaComponent from "./lib/dynaComponent";
|
import DynaComponent from "./lib/dynaComponent";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "rsApproval",
|
name: "rsApproval",
|
||||||
components: {DynaComponent},
|
components: {DynaComponent},
|
||||||
appName: "考核评分",
|
appName: "考核评分",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
task: {},
|
|
||||||
detail: [],//动态表单
|
detail: [],//动态表单
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -35,7 +40,7 @@ export default {
|
|||||||
form() {
|
form() {
|
||||||
let form = {}
|
let form = {}
|
||||||
this.detail.map(e => {
|
this.detail.map(e => {
|
||||||
if (e.inputType == "0") {
|
if (e.inputType == "2") {
|
||||||
if (!form[e.groupLevel1Name]) {
|
if (!form[e.groupLevel1Name]) {
|
||||||
form[e.groupLevel1Name] = {}
|
form[e.groupLevel1Name] = {}
|
||||||
}
|
}
|
||||||
@@ -50,16 +55,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getTask() {
|
|
||||||
const {taskId: id} = this.$route.query
|
|
||||||
return this.$http.post("/app/appassessmentscorev2task/queryDetailById", null, {
|
|
||||||
params: {id}
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.data) {
|
|
||||||
this.task = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getDetail() {
|
getDetail() {
|
||||||
const {taskDetailId} = this.$route.query
|
const {taskDetailId} = this.$route.query
|
||||||
return this.$http.post("/app/appassessmentscorev2task/queryDataInfoById2", null, {
|
return this.$http.post("/app/appassessmentscorev2task/queryDataInfoById2", null, {
|
||||||
@@ -77,8 +72,34 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
submit() {
|
handleReject() {
|
||||||
if (!this.detail.filter(e => e.inputType == '0')?.some(e => {
|
if (this.check()) {
|
||||||
|
const {$route: {query: {taskDetailId}}, detail: fields} = this
|
||||||
|
this.$http.post("/app/appassessmentscorev2task/examine", {
|
||||||
|
taskDetailId, pass: false, fields
|
||||||
|
}).then(res => {
|
||||||
|
if (res?.code == 0) {
|
||||||
|
this.$u.toast("提交成功!")
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handlePass() {
|
||||||
|
if (this.check()) {
|
||||||
|
const {$route: {query: {taskDetailId}}, detail: fields} = this
|
||||||
|
this.$http.post("/app/appassessmentscorev2task/examine", {
|
||||||
|
taskDetailId, pass: true, fields
|
||||||
|
}).then(res => {
|
||||||
|
if (res?.code == 0) {
|
||||||
|
this.$u.toast("提交成功!")
|
||||||
|
uni.navigateBack()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
check() {
|
||||||
|
return !this.detail.filter(e => e.inputType == '0')?.some(e => {
|
||||||
const desc = [e.groupLevel1Name, e.groupLevel2Name, e.fieldName].filter(Boolean)?.join("-")
|
const desc = [e.groupLevel1Name, e.groupLevel2Name, e.fieldName].filter(Boolean)?.join("-")
|
||||||
if (e.mustFill == 1 && !e.fieldValue) {
|
if (e.mustFill == 1 && !e.fieldValue) {
|
||||||
this.$u.toast("请填写" + desc)
|
this.$u.toast("请填写" + desc)
|
||||||
@@ -87,22 +108,11 @@ export default {
|
|||||||
this.$u.toast(`${desc}请输入正确范围(0~${e.maxScore})`)
|
this.$u.toast(`${desc}请输入正确范围(0~${e.maxScore})`)
|
||||||
return true
|
return true
|
||||||
} else return false
|
} else return false
|
||||||
})) {
|
})
|
||||||
const {$route: {query: {taskDetailId, taskId}}, detail: fields} = this
|
|
||||||
this.$http.post("/app/appassessmentscorev2task/commit", {
|
|
||||||
taskDetailId, taskId, fields
|
|
||||||
}).then(res => {
|
|
||||||
if (res?.code == 0) {
|
|
||||||
this.$u.toast("提交成功!")
|
|
||||||
uni.navigateBack()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDetail()
|
this.getDetail()
|
||||||
this.getTask()
|
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = this.$options.appName
|
document.title = this.$options.appName
|
||||||
@@ -112,5 +122,39 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.rsApproval {
|
.rsApproval {
|
||||||
|
.reject{
|
||||||
|
font-family: PingFangSC-Medium, PingFang SC;
|
||||||
|
line-height: 112px;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #f46;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .groupHeader {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
content: " ";
|
||||||
|
width: 4px;
|
||||||
|
height: 24px;
|
||||||
|
background: #3975C6;
|
||||||
|
left: -8px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-100%, -50%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .AiItem {
|
||||||
|
.labelPane {
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -10,16 +10,17 @@
|
|||||||
<div class="subLabel" v-text="key"/>
|
<div class="subLabel" v-text="key"/>
|
||||||
<AiItem v-for="row in item" :key="row.id" :label="row.fieldName" topLabel>
|
<AiItem v-for="row in item" :key="row.id" :label="row.fieldName" topLabel>
|
||||||
<div class="mar-t8" slot="sub" v-if="row.explain" v-text="row.explain"/>
|
<div class="mar-t8" slot="sub" v-if="row.explain" v-text="row.explain"/>
|
||||||
<dyna-component :item.sync="row" @input="handleDetailItem"/>
|
<dyna-component :item.sync="row" @input="handleDetailItem" :disabled="isApprove"/>
|
||||||
</AiItem>
|
</AiItem>
|
||||||
</template>
|
</template>
|
||||||
<AiItem v-else :label="item.fieldName" topLabel>
|
<AiItem v-else :label="item.fieldName" topLabel>
|
||||||
<div class="mar-t8" slot="sub" v-if="item.explain" v-text="item.explain"/>
|
<div class="mar-t8" slot="sub" v-if="item.explain" v-text="item.explain"/>
|
||||||
<dyna-component :item.sync="item" @input="handleDetailItem"/>
|
<dyna-component :item.sync="item" @input="handleDetailItem" :disabled="isApprove"/>
|
||||||
</AiItem>
|
</AiItem>
|
||||||
</template>
|
</template>
|
||||||
</AiGroup>
|
</AiGroup>
|
||||||
<AiBottomBtn text="提交" @click="submit"/>
|
<AiBottomBtn v-if="isApprove" text="评分审核" @click="gotoApprove"/>
|
||||||
|
<AiBottomBtn v-else text="提交" @click="submit"/>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -37,6 +38,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
isApprove:v=>v.$route.query.approve==1,
|
||||||
form() {
|
form() {
|
||||||
let form = {}
|
let form = {}
|
||||||
this.detail.map(e => {
|
this.detail.map(e => {
|
||||||
@@ -103,6 +105,10 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
gotoApprove(){
|
||||||
|
const {taskId,taskDetailId} = this.$route.query
|
||||||
|
uni.navigateTo({url: this.$qs.stringifyUrl({url: "./rsApproval", query: {taskId, taskDetailId}})})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|||||||
Reference in New Issue
Block a user