Ver código fonte

Task 合同签订审批

rongxin_dev
zhaodengke 7 meses atrás
pai
commit
8c186903bf
5 arquivos alterados com 275 adições e 0 exclusões
  1. +9
    -0
      src/api/yinnong/yinnongApproval.js
  2. +9
    -0
      src/router/index.js
  3. +251
    -0
      src/views/yinnong/bankAgriculture/approval/contractionApproval.vue
  4. +3
    -0
      src/views/yinnong/doneCompleted/completedNew.vue
  5. +3
    -0
      src/views/yinnong/doneCompleted/doneNew.vue

+ 9
- 0
src/api/yinnong/yinnongApproval.js Ver arquivo

@@ -18,3 +18,12 @@ export function getAsset(id) {
})
}

// 查询合同签订详细
export function getContraction(id) {
return request({
url: '/yinnong/contraction/get/' + id,
method: 'get',
params: arguments[1] || {}
})
}


+ 9
- 0
src/router/index.js Ver arquivo

@@ -2375,6 +2375,15 @@ export const constantRoutes = [
},
component: (resolve) => require(['@/views/yinnong/bankAgriculture/approval/assetApproval'], resolve)
},
{
path: '/yinnong/contractionApproval',
name: 'contractionApproval',
meta: {
title: '合同签订申请审批',
hidden: true,
},
component: (resolve) => require(['@/views/yinnong/bankAgriculture/approval/contractionApproval'], resolve)
},

{
path: '/yinnong/approvalModify',


+ 251
- 0
src/views/yinnong/bankAgriculture/approval/contractionApproval.vue Ver arquivo

@@ -0,0 +1,251 @@
<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.conName" label="合同名称" input-align="right" />
<van-field :value="form.applyAt" label="申请日期" input-align="right" />
<van-field :value="form.contractionType" label="合同类型" input-align="right" />
<van-field :value="form.paymentType" label="结款类型" input-align="right" />
<van-field :value="form.isTender" label="是否招投标" input-align="right" />
<van-field :value="form.totalAmount" label="合同金额(元)" input-align="right" type="number" />
<van-field :value="form.secondParty" label="对方单位" input-align="right" />
<van-field :value="form.secondPartyDirector" label="对方代表" input-align="right" />
<van-field :value="form.secondPartyPhone" label="对方代表电话" input-align="right" />
<van-field :value="form.startTime" label="开始日期" input-align="right" />
<van-field :value="form.endTime" label="结束日期" input-align="right" />
<van-field :value="approvalTemplateName" label="审批流程" input-align="right"/>
<van-field :value="form.remark" 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 {getContraction} from "@/api/yinnong/yinnongApproval";

export default {
name: "contractionApproval",
data() {
return {
form: {},
templateList:[],
// 审核意见默认值
pass: "true",
comment: "同意",
showAttachment: false,
fileList: [],
tableName: 't_sys_contraction',
};
},
created() {
this.reset();
listTemplate({ type: '9' }).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,
conName: null,
applyAt: null,
contractionType: null,
paymentType: null,
isTender: null,
totalAmount: null,
secondParty: null,
secondPartyDirector: null,
secondPartyPhone: null,
startTime: null,
endTime: null,
remark: null,
auditStatus: null,
auditbatchNo: null,
approvalTemplateId: null,
isArchive: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
},
getDetail(){
getContraction(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>

+ 3
- 0
src/views/yinnong/doneCompleted/completedNew.vue Ver arquivo

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


+ 3
- 0
src/views/yinnong/doneCompleted/doneNew.vue Ver arquivo

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


Carregando…
Cancelar
Salvar