Преглед изворни кода

Task 资产处置审批

rongxin_dev
zhaodengke пре 7 месеци
родитељ
комит
5222fc1bf6
6 измењених фајлова са 267 додато и 11 уклоњено
  1. +11
    -0
      src/api/yinnong/asset.js
  2. +10
    -1
      src/router/index.js
  3. +236
    -0
      src/views/yinnong/bankAgriculture/asset/assetApproval.vue
  4. +4
    -10
      src/views/yinnong/bankAgriculture/seal/sealApproval.vue
  5. +3
    -0
      src/views/yinnong/doneCompleted/completedNew.vue
  6. +3
    -0
      src/views/yinnong/doneCompleted/doneNew.vue

+ 11
- 0
src/api/yinnong/asset.js Прегледај датотеку

@@ -0,0 +1,11 @@
import request from '@/utils/request'

// 查询资产处置详细
export function getAsset(id) {
return request({
url: '/yinnong/asset/get/' + id,
method: 'get',
params: arguments[1] || {}
})
}


+ 10
- 1
src/router/index.js Прегледај датотеку

@@ -2361,11 +2361,20 @@ export const constantRoutes = [
path: '/yinnong/sealApproval',
name: 'sealApproval',
meta: {
title: '用章事项审批',
title: '用章事项申请审批',
hidden: true,
},
component: (resolve) => require(['@/views/yinnong/bankAgriculture/seal/sealApproval'], resolve)
},
{
path: '/yinnong/assetApproval',
name: 'assetApproval',
meta: {
title: '资产处置申请审批',
hidden: true,
},
component: (resolve) => require(['@/views/yinnong/bankAgriculture/asset/assetApproval'], resolve)
},

{
path: '/yinnong/approvalModify',


+ 236
- 0
src/views/yinnong/bankAgriculture/asset/assetApproval.vue Прегледај датотеку

@@ -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>

+ 4
- 10
src/views/yinnong/bankAgriculture/seal/sealApproval.vue Прегледај датотеку

@@ -2,7 +2,7 @@
<div class="app-container">
<van-nav-bar left-arrow fixed placeholder @click-left="goBack">
<template #title>
<p style="font-weight: bold;">用章事项审批申请</p>
<p style="font-weight: bold;">用章事项申请审批</p>
</template>
<template #right>
<van-icon name="../../../static/images/icon/icon_flow.png" size="20" @click="goFlow"/>
@@ -61,30 +61,24 @@

<script>

import {selectApprovalByTemplateId, listTemplate, approval} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import { getCashExpense } from "@/api/onlineHome/bankAgriculture/cashExpense";
import {listTemplate, approval} from "@/api/onlineHome/bankAgriculture/paymentApproval";
import {attachmentList} from "@/api/sunVillage_info/fixedAssets";
import request from "@/utils/request";
import {getSeal} from "@/api/yinnong/seal";
import {A_auditHistoryDetail} from "@/api/audit/aauditpipeline";
import {selectDictLabel} from "@/utils/utils";

export default {
name: "sealApproval",
data() {
return {
form: {},

capitalExpenditureType: null,
capitalExpenditureTypeOptions:[],
templateList:[],

// 审核意见默认值
pass: "true",
comment: "同意",

showAttachment: false,
fileList: [],
tableName: 't_sys_seal',
};
},
created() {
@@ -165,7 +159,7 @@ export default {
this.fileList = [];
let params = {
tableId: id,
tableName: 't_sys_seal',
tableName: this.tableName,
bizPath: "yinnong",
fileType: '',
};


+ 3
- 0
src/views/yinnong/doneCompleted/completedNew.vue Прегледај датотеку

@@ -246,6 +246,9 @@
case 't_sys_seal':
this.$router.push({name:'sealApproval',query: {id:item.data.id,taskId:item.id, auditbatchNo: item.auditbatchNo, type:"todo"}})
break;
case 't_sys_asset':
this.$router.push({name:'assetApproval',query: {id:item.data.id,taskId:item.id, auditbatchNo: item.auditbatchNo, type:"todo"}})
break;
}
}
},


+ 3
- 0
src/views/yinnong/doneCompleted/doneNew.vue Прегледај датотеку

@@ -227,6 +227,9 @@
case 't_sys_seal':
this.$router.push({name:'sealApproval',query: {id:item.data.id,taskId:item.id, auditbatchNo: item.auditbatchNo, type:"done"}})
break;
case 't_sys_asset':
this.$router.push({name:'assetApproval',query: {id:item.data.id,taskId:item.id, auditbatchNo: item.auditbatchNo, type:"done"}})
break;
}
}
},


Loading…
Откажи
Сачувај