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">
<div class="related-processes-title">相关流程</div> <div class="related-processes-title">相关流程</div>
<div class="related-processes-item"> <div class="related-processes-item">
<div>采购流程查看</div> <div @click="seeBuyProcess"></div>
<div>合同会签流程</div> <div @click="seeSignProcess"></div>
<div>招标审批流程</div> <div @click="seeBidding"></div>
<template v-if="detail.is_plan != 1">
<div @click="seeAskProcess"></div>
</template>
</div> </div>
</div> </div>
<div class="journal"> <div class="journal">
@ -94,6 +97,7 @@
import {detailContract} from "@/api/contract/contract"; import {detailContract} from "@/api/contract/contract";
import {delContractSign, getContractSign} from "@/api/contractSign/contractSign" import {delContractSign, getContractSign} from "@/api/contractSign/contractSign"
import {parseTime} from "@/utils" import {parseTime} from "@/utils"
import {getOatoken} from "@/api/oatoken";
import {Message} from "element-ui"; import {Message} from "element-ui";
import detailContractSign from "./detailContractSign" import detailContractSign from "./detailContractSign"
@ -103,6 +107,13 @@ export default {
}, },
data() { data() {
return { return {
window:{
width:0,
height:0,
top:0,
left:0
},
// //
id:'', id:'',
detail:null, detail:null,
@ -200,6 +211,60 @@ export default {
} }
}, },
methods: { 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){ async getDetail(id){
this.id = id this.id = id
let res = await detailContract({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> </script>
@ -319,7 +390,6 @@ export default {
&>div{ &>div{
cursor: pointer; cursor: pointer;
flex-basis: 16%;
margin: 0 20px; margin: 0 20px;
} }

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

Loading…
Cancel
Save