96 lines
2.9 KiB
Vue
96 lines
2.9 KiB
Vue
<template>
|
|
<view>
|
|
<info :id="formData.condolenceId">
|
|
<view class="van-cell-group__title">
|
|
分工会审核
|
|
</view>
|
|
<van-form :show-error-message="false" input-align="right" ref="auditForm">
|
|
<van-cell-group inset>
|
|
<van-field label="审核人" name="userName" readonly v-model="formData.userName"/>
|
|
<van-field label="审核时间" name="auditTime" readonly :value="$moment().format('YYYY-MM-DD')"/>
|
|
<van-field label="审核意见" name="auditOpinion" v-model="formData.opinion"
|
|
:rules="[{required:true, message: '请输入审核意见'}]"
|
|
autosize
|
|
type="textarea"
|
|
maxlength="1000"
|
|
placeholder="请输入审核意见"/>
|
|
<!-- <van-field name="sign.signText" label="签字"-->
|
|
<!-- :rules="[{required:true, message: '请签字'}]"-->
|
|
<!-- v-model="formData.sign.signText">-->
|
|
<!-- <template #input>-->
|
|
<!-- <Signature v-model="formData.sign.signText"/>-->
|
|
<!-- </template>-->
|
|
<!-- </van-field>-->
|
|
</van-cell-group>
|
|
</van-form>
|
|
|
|
<view class="operate">
|
|
<template v-for="item in dict.type.sys_audit_result">
|
|
<van-button @click="doAudit(item)" :type="item.raw.listClass">
|
|
{{ item.label }}
|
|
</van-button>
|
|
</template>
|
|
</view>
|
|
|
|
</info>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import info from "../components/info";
|
|
|
|
export default {
|
|
components: {
|
|
info
|
|
},
|
|
dicts: ['sys_audit_result'],
|
|
data() {
|
|
return {
|
|
formData: {
|
|
condolenceId: null,
|
|
userName: this.$store.getters.name,
|
|
auditTime: this.$moment().format('YYYY-MM-DD HH:mm:ss'),
|
|
auditOpinion: null,
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
doAudit(item) {
|
|
this.$refs.auditForm.validate().then(async () => {
|
|
const formData = {...this.formData}
|
|
let url = null
|
|
switch (item.value) {
|
|
case '1':
|
|
url = '/staff/condolence/branchUnionAudit/doPass';
|
|
break
|
|
case '2':
|
|
url = '/staff/condolence/branchUnionAudit/doReject';
|
|
break
|
|
case '3':
|
|
url = '/staff/condolence/branchUnionAudit/doBackTo';
|
|
break
|
|
}
|
|
|
|
this.$modal.confirm(`您确定要${item.label}吗?`).then(async () => {
|
|
this.$modal.loading()
|
|
const {msg} = await this.$http.post(url, formData)
|
|
this.$modal.msgSuccess(msg)
|
|
this.$modal.closeLoading()
|
|
uni.$emit('refreshData', null)
|
|
this.$tab.navigateBack()
|
|
}).finally(() => {
|
|
this.$modal.closeLoading()
|
|
})
|
|
})
|
|
}
|
|
},
|
|
onLoad({id}) {
|
|
this.formData.condolenceId = id
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
|
|
</style>
|