|
|
@@ -0,0 +1,236 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<van-nav-bar left-arrow fixed placeholder @click-left="goBack"> |
|
|
|
<template #title> |
|
|
|
<p style="font-weight: bold;">资产处置申请审批</p> |
|
|
|
</template> |
|
|
|
<template #right> |
|
|
|
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/> |
|
|
|
</template> |
|
|
|
</van-nav-bar> |
|
|
|
|
|
|
|
<van-form readonly> |
|
|
|
<div class="main_box"> |
|
|
|
<van-field :value="form.assetName" label="资产名称" input-align="right" /> |
|
|
|
<van-field :value="form.applyAt" label="申请日期" input-align="right" /> |
|
|
|
<van-field :value="form.assetType" label="资产类别" input-align="right" /> |
|
|
|
<van-field :value="form.assetStatus" label="处置类型" input-align="right" /> |
|
|
|
<van-field :value="approvalTemplateName" label="审批流程" input-align="right"/> |
|
|
|
<van-field :value="form.doRemark" label="处置原因" input-align="right" /> |
|
|
|
|
|
|
|
<van-field label="附件" input-align="right" readonly> |
|
|
|
<template #button> |
|
|
|
<van-button type="info" size="small" @click="openAttachment(form.id)" >查看附件</van-button> |
|
|
|
</template> |
|
|
|
</van-field> |
|
|
|
|
|
|
|
<van-popup v-model="showAttachment" lock-scroll closeable position="top" :style="{ height: '30%' }" > |
|
|
|
<div style="padding: 0 13% 0 5%;"> |
|
|
|
<van-divider>附件</van-divider> |
|
|
|
<van-uploader v-model="fileList" multiple :readonly="true" :show-upload="false" /> |
|
|
|
</div> |
|
|
|
</van-popup> |
|
|
|
</div> |
|
|
|
</van-form> |
|
|
|
|
|
|
|
<div class="main_box examine_box"> |
|
|
|
<van-row type="flex" justify="space-between" align="center"> |
|
|
|
<van-col span="5">审批<br/>意见</van-col> |
|
|
|
<van-col span="19"> |
|
|
|
<van-radio-group v-model="pass" direction="horizontal" :disabled="!isAudit"> |
|
|
|
<van-radio name="true">同意</van-radio> |
|
|
|
<van-radio name="false">驳回</van-radio> |
|
|
|
</van-radio-group> |
|
|
|
<van-field :readonly="!isAudit" v-model="comment" type="textarea" placeholder="请输入审批意见" rows="2" /> |
|
|
|
</van-col> |
|
|
|
</van-row> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="margin: 16px 2%;" v-if="isAudit"> |
|
|
|
<van-row> |
|
|
|
<van-col span="24" align="center"> |
|
|
|
<van-button type="info" native-type="submit" @click="submitApproval" class="submitButton">保<i style="margin-right: 1em;"></i>存</van-button> |
|
|
|
</van-col> |
|
|
|
</van-row> |
|
|
|
<div class="clear"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
import {listTemplate, approval} from "@/api/onlineHome/bankAgriculture/paymentApproval"; |
|
|
|
import {attachmentList} from "@/api/sunVillage_info/fixedAssets"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
import {A_auditHistoryDetail} from "@/api/audit/aauditpipeline"; |
|
|
|
import {getAsset} from "@/api/yinnong/asset"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "assetApproval", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
form: {}, |
|
|
|
templateList:[], |
|
|
|
// 审核意见默认值 |
|
|
|
pass: "true", |
|
|
|
comment: "同意", |
|
|
|
showAttachment: false, |
|
|
|
fileList: [], |
|
|
|
tableName: 't_sys_asset', |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.reset(); |
|
|
|
listTemplate({ type: '8' }).then(response => { |
|
|
|
this.templateList = response.rows; |
|
|
|
}); |
|
|
|
this.getDetail(); |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
pass: function (val) { |
|
|
|
if(this.isAudit) |
|
|
|
this.comment = val === "true" ? "同意" : "驳回"; |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
goBack(){ |
|
|
|
this.$router.back(-1); |
|
|
|
}, |
|
|
|
// 表单重置 |
|
|
|
reset() { |
|
|
|
this.form = { |
|
|
|
id: null, |
|
|
|
deptId: null, |
|
|
|
bookId: null, |
|
|
|
bookName: null, |
|
|
|
applyAt: null, |
|
|
|
assetName: null, |
|
|
|
assetType: null, |
|
|
|
assetStatus: null, |
|
|
|
doRemark: null, |
|
|
|
auditStatus: null, |
|
|
|
auditbatchNo: null, |
|
|
|
approvalTemplateId: null, |
|
|
|
createBy: null, |
|
|
|
createTime: null, |
|
|
|
updateBy: null, |
|
|
|
updateTime: null |
|
|
|
}; |
|
|
|
}, |
|
|
|
getDetail(){ |
|
|
|
getAsset(this.$route.query.id, {translate_dict: 1}).then(response => { |
|
|
|
this.form = response.data; |
|
|
|
if(!this.isAudit) |
|
|
|
{ |
|
|
|
A_auditHistoryDetail(this.$route.query.taskId).then((resp) => { |
|
|
|
this.pass = resp.data.auditStatus === '3' ? "true" : 'false'; |
|
|
|
this.comment = resp.data.auditRemark; |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
submitApproval() { |
|
|
|
approval({ |
|
|
|
taskId: this.$route.query.taskId, |
|
|
|
auditbatchNo: this.$route.query.auditbatchNo, |
|
|
|
pass: this.pass, |
|
|
|
remark: this.comment, |
|
|
|
deptId: this.form.deptId |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === 200) { |
|
|
|
this.$toast.success("保存成功"); |
|
|
|
setTimeout(function () { |
|
|
|
history.go(-1) |
|
|
|
}, 500); |
|
|
|
} else { |
|
|
|
this.$toast.success("保存失败"); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
goFlow(){ |
|
|
|
this.$router.push({name: 'approvalProcess13', query: { id: this.$route.query.auditbatchNo, templateId: this.form.approvalTemplateId }}); |
|
|
|
}, |
|
|
|
openAttachment(id) { |
|
|
|
this.showAttachment = true; |
|
|
|
this.fileList = []; |
|
|
|
let params = { |
|
|
|
tableId: id, |
|
|
|
tableName: this.tableName, |
|
|
|
bizPath: "yinnong", |
|
|
|
fileType: '', |
|
|
|
}; |
|
|
|
attachmentList(params).then(res => { |
|
|
|
res.rows.map(r => { |
|
|
|
let baseUrl = location.protocol + "//" + location.host + request.defaults.baseURL; |
|
|
|
this.fileList.push({"url": baseUrl + r.fileUrl, "file": new File([], r.fileName, {}), "id": r.id}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
isAudit() { |
|
|
|
return this.$route.query.type != 'done'; |
|
|
|
}, |
|
|
|
approvalTemplateName() { |
|
|
|
const item = this.templateList.find((x) => x.id == this.form.approvalTemplateId); |
|
|
|
return item ? item.name : this.form.approvalTemplateId; |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
.app-container { |
|
|
|
padding: 2% 0; |
|
|
|
} |
|
|
|
|
|
|
|
.main_box { |
|
|
|
width: 96%; |
|
|
|
margin: 0 auto; |
|
|
|
border-radius: 6px; |
|
|
|
box-shadow: 0px 3px 6px 0px rgba(0, 0, 0, 0.16); |
|
|
|
overflow: hidden; |
|
|
|
background-color: #FFF; |
|
|
|
} |
|
|
|
|
|
|
|
.submitButton { |
|
|
|
width: 80%; |
|
|
|
margin: 0 auto; |
|
|
|
background-color: #1D6FE9; |
|
|
|
} |
|
|
|
|
|
|
|
.examine_box { |
|
|
|
background-color: #1D6FE9 !important; |
|
|
|
padding: 0.18rem !important; |
|
|
|
padding-left: 0 !important; |
|
|
|
border-radius: 0.15rem !important; |
|
|
|
margin-top: 0.3rem !important; |
|
|
|
} |
|
|
|
|
|
|
|
.examine_box .van-col:first-child { |
|
|
|
color: #FFF !important; |
|
|
|
font-size: 0.45rem !important; |
|
|
|
text-align: center !important; |
|
|
|
} |
|
|
|
|
|
|
|
.examine_box .van-col:last-child { |
|
|
|
background-color: #FFF !important; |
|
|
|
border-radius: 0.15rem !important; |
|
|
|
overflow: hidden !important; |
|
|
|
|
|
|
|
.van-radio-group--horizontal { |
|
|
|
padding: 0.2rem 0; |
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/deep/ .van-radio--horizontal { |
|
|
|
margin-left: 20px; |
|
|
|
margin-right: 0; |
|
|
|
} |
|
|
|
|
|
|
|
.submitButton { |
|
|
|
width: 96%; |
|
|
|
margin: 0 auto; |
|
|
|
} |
|
|
|
</style> |