2022.7.29 (2)

master
271556543@qq.com 3 years ago
parent 0f46323296
commit dee6df9c4b

@ -66,9 +66,12 @@
<div class="related-processes">
<div class="related-processes-title">相关流程</div>
<div class="related-processes-item">
<div>采购流程查看</div>
<div>合同会签流程</div>
<div>招标审批流程</div>
<div @click="seeBuyProcess"></div>
<div @click="seeSignProcess"></div>
<div @click="seeBidding"></div>
<template v-if="detail.is_plan != 1">
<div @click="seeAskProcess"></div>
</template>
</div>
</div>
<div class="journal">
@ -94,6 +97,7 @@
import {detailContract} from "@/api/contract/contract";
import {delContractSign, getContractSign} from "@/api/contractSign/contractSign"
import {parseTime} from "@/utils"
import {getOatoken} from "@/api/oatoken";
import {Message} from "element-ui";
import detailContractSign from "./detailContractSign"
@ -103,6 +107,13 @@ export default {
},
data() {
return {
window:{
width:0,
height:0,
top:0,
left:0
},
//
id:'',
detail:null,
@ -200,6 +211,60 @@ export default {
}
},
methods: {
async seeBuyProcess(){
if(!this.detail?.purchase_last_flow_id){
Message({
type:"warning",
message:"还未进行采购申请",
duration:2000
})
return
}
let res = await getOatoken()
let url =`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.purchase_last_flow_id}?oatoken=${res.oatoken}`
let seeBuy = window.open(url,'seeBuy',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`)
},
async seeBidding(){
if(!this.detail?.invite_last_flow_id){
Message({
type:"warning",
message:"还未进行招标申请",
duration:2000
})
return
}
let res = await getOatoken()
let url =`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.invite_last_flow_id}?oatoken=${res.oatoken}`
let seeBidding = window.open(url,'seeBidding',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`)
},
async seeSignProcess(){
if(!this.detail?.join_last_flow_id){
Message({
type:"warning",
message:"还未进行会签申请",
duration:2000
})
return
}
let res = await getOatoken()
let url =`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.join_last_flow_id}?oatoken=${res.oatoken}`
let seeSign = window.open(url,'seeSign',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`)
},
async seeAskProcess(){
if(!this.detail?.req_last_flow_id){
Message({
type:"warning",
message:"还未进行请示申请",
duration:2000
})
return
}
let res = await getOatoken()
let url =`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.req_last_flow_id}?oatoken=${res.oatoken}`
let seeAsk = window.open(url,'seeAsk',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`)
},
async getDetail(id){
this.id = id
let res = await detailContract({id:id})
@ -238,6 +303,12 @@ export default {
}
}
}
},
mounted() {
this.window.width = screen.availWidth * 0.8
this.window.height = screen.availHeight * 0.8
this.window.top = (window.screen.height - 30 - this.window.height)/2
this.window.left = (window.screen.width - 10 - this.window.width)/2
}
}
</script>
@ -319,7 +390,6 @@ export default {
&>div{
cursor: pointer;
flex-basis: 16%;
margin: 0 20px;
}

@ -85,20 +85,21 @@
<template slot-scope="scope">
<div class="slot-btns">
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['paymentRegistration'].isShowPaymentRegistration = true,$refs['paymentRegistration'].getContract(scope.row)">付款登记</Button>
<template v-if="scope.row.status === 1">
<template v-if="scope.row.status === 1 && scope.row.join_status === 3">
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id">签订合同</Button>
</template>
<template v-if="scope.row.invite_status === 1">
<template v-if="scope.row.invite_status === 1 && scope.row.purchase_status === 3">
<Button class="slot-btns-item" type="primary" size="small" @click="bidding(scope.row)"></Button>
</template>
<Button class="slot-btns-item" type="primary" size="small">附件管理</Button>
<template v-if="scope.row.req_status === 1 && scope.row.is_plan === 0">
<Button class="slot-btns-item" type="primary" size="small" @click="askProcess(scope.row)"></Button>
</template>
<template v-if="scope.row.join_status === 1">
<template v-if="scope.row.join_status === 1 && scope.row.invite_status === 3">
<Button class="slot-btns-item" type="primary" size="small" @click="signProcess(scope.row)"></Button>
</template>
<template v-if="scope.row.purchase_status === 1">
<template
v-if="scope.row.purchase_status === 1 && ((scope.row.req_status === 3 && scope.row.is_plan === 0)||scope.row.is_plan === 1)">
<Button class="slot-btns-item" type="primary" size="small" @click="buyProcess(scope.row)"></Button>
</template>
<Poptip
@ -108,12 +109,15 @@
title="确认要删除吗"
@on-ok="()=>deleteContract(scope.row.id)">
<i-button
class="slot-btns-item"
type="error"
size="small"
ghost>删除</i-button>
</Poptip>
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['detailContract'].isShowDetail = true,$refs['detailContract'].getDetail(scope.row.id)">查看</Button>
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['editor'].isShowEditor = true,$refs['editor'].getDetail(scope.row.id)">编辑</Button>
<template v-if="scope.row.status != 2">
<Button class="slot-btns-item" type="primary" size="small" @click="$refs['editor'].isShowEditor = true,$refs['editor'].getDetail(scope.row.id)">编辑</Button>
</template>
</div>
</template>
</el-table-column>
@ -210,7 +214,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>关联预算计划
</div>
<div class="xy-table-item-content">
<div class="contract-add-plan" style="width: 300px;" @click="isShowPlan = true,getBudgets()">
<div class="contract-add-plan" style="width: 300px;" @click="showPlan">
<template v-if="form.plan.length > 0">
<template v-for="item in form.plan">
<Tag closable color="primary" @on-close="delPlan(item)">{{item.label}}</Tag>
@ -230,7 +234,7 @@
<template v-slot:normalContent>
<Input v-model="planSearch" search enter-button=" " placeholder="搜索预算计划.." @on-search="getBudgets"/>
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="300" style="margin-top: 10px;">
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="300" style="margin-top: 10px;" ref="planTable" @select="selectPlan">
<template v-slot:btns>
<el-table-column label="使用金额" header-align="center">
<template slot-scope="scope">
@ -277,6 +281,7 @@ import editor from "./components/editorContract"
import detail from "./components/detailContract"
import paymentRegistration from "./components/paymentRegistration";
import contractSign from "@/views/contract/components/contractSign";
import {login} from "@/api/user";
export default {
components:{
editor,
@ -499,15 +504,9 @@ export default {
planTable:[
{
sortable:false,
width:36,
customFn:(row)=>{
return (
<div>
<Checkbox on={{['on-change']:(e)=>this.selectPlan(e,row)}}></Checkbox>
</div>
)
}
width: 36,
sortable: false,
type:'selection'
},
{
label:"分类",
@ -705,24 +704,43 @@ export default {
this.total = res.total
},
//
//
async showPlan(){
this.isShowPlan = true
await this.getBudgets()
this.toggleSelection(this.form.plan.map(item => {
return item.value.plan_id
}))
},
//
selectPlan(e,row){
if(e){
this.form.plan.push({
label:row.name,
value:{
plan_id:row.id,
use_money:row.useMoney ?? row.money,
new_money:row.money
selectPlan(sel,row){
if(sel){
this.form.plan = sel.map(item => {
return {
label:item.name,
value:{
plan_id:item.id,
use_money:item.useMoney ?? item.money,
new_money:item.money
}
}
})
}else{
this.form.plan.map((item,index)=>{
if(item.value.plan_id === row.id){
this.form.plan.splice(index,1)
}
this.form.plan = []
}
},
//
toggleSelection(plans) {
if (plans) {
this.plans.filter(plan => {
return plans.includes(plan.id)
}).map(row => {
this.$refs.planTable.toggleRowSelection(row)
})
} else {
this.$refs.planTable.clearSelection()
}
},
delPlan(val){
@ -753,6 +771,7 @@ export default {
message:'操作成功'
})
this.$refs['addContract'].reset()
this.$refs['planTable'].clearSelection()
this.getContracts()
})
},
@ -779,6 +798,11 @@ export default {
this.getDepartment()
this.getPurchaseWay()
this.getMoneyWay()
//
window.onfocus = () => {
this.getContracts()
}
},
}
</script>

Loading…
Cancel
Save