刘翔宇-旅管家 3 years ago
parent 938e1396d5
commit 4e38f1beea

@ -71,7 +71,10 @@
</div> </div>
<div class="pay-plan"> <div class="pay-plan">
<div class="pay-plan-title">付款计划</div> <div class="pay-plan-title">付款计划</div>
<xy-table :height="240" :list="signPlan" :table-item="planTable" :show-index="false" :btn-width="130" @delete="deletePayPlan" @editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}"></xy-table> <xy-table :height="240" :list="signPlan" :table-item="planTable" :show-index="false" :btn-width="130"
@delete="deletePayPlan"
@editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}">
</xy-table>
</div> </div>
<div class="related-processes"> <div class="related-processes">
<div class="related-processes-title">相关流程进展查看</div> <div class="related-processes-title">相关流程进展查看</div>
@ -106,386 +109,429 @@
</template> </template>
<script> <script>
import {detailContract} from "@/api/contract/contract"; import {
import {delContractSign, getContractSign} from "@/api/contractSign/contractSign" detailContract
import {parseTime} from "@/utils" } from "@/api/contract/contract";
import {getOatoken} from "@/api/oatoken"; import {
import {Message} from "element-ui"; delContractSign,
import {moneyFormatter} from "@/utils" getContractSign
import {getparameter} from "@/api/system/dictionary"; } from "@/api/contractSign/contractSign"
import {
import detailContractSign from "./detailContractSign" parseTime
export default { } from "@/utils"
components:{ import {
detailContractSign getOatoken
}, } from "@/api/oatoken";
data() { import {
return { Message
window:{ } from "element-ui";
width:0, import {
height:0, moneyFormatter
top:0, } from "@/utils"
left:0 import {
}, getparameter
} from "@/api/system/dictionary";
// import detailContractSign from "./detailContractSign"
id:'', export default {
detail:null, components: {
isShowDetail:false, detailContractSign
linkBudgetPlanTable:[ },
{ data() {
label:"ID", return {
sortable:false, window: {
prop:'id', width: 0,
width:130 height: 0,
top: 0,
left: 0
}, },
{
label:"类型", //
width:100, id: '',
sortable: false, detail: null,
customFn:(row)=>{ isShowDetail: false,
const typeSwitch = (type) => { linkBudgetPlanTable: [{
{ label: "ID",
let res = this.planTypes.filter(item => { sortable: false,
return item.id === type prop: 'id',
}) width: 130
return res[0]?.value || '未知' },
{
label: "类型",
width: 100,
sortable: false,
customFn: (row) => {
const typeSwitch = (type) => {
{
let res = this.planTypes.filter(item => {
return item.id === type
})
return res[0]?.value || '未知'
}
} }
return ( <
div >
<
Tag color = "primary" > {
typeSwitch(row.type)
} <
/Tag> <
/div>
)
}
},
{
label: "项目",
width: 140,
sortable: false,
prop: 'name'
},
{
label: "金额",
sortable: false,
prop: 'money',
align: 'right',
minWidth: 200,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
label: '使用金额',
sortable: false,
prop: 'useMoney',
align: 'right',
minWidth: 200,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
} }
return (
<div>
<Tag color="primary">
{
typeSwitch(row.type)
}
</Tag>
</div>
)
} }
}, ],
{ journalTable: [{
label:"项目", label: 'ID',
width: 140, sortable: false,
sortable: false, prop: 'id'
prop:'name' },
}, {
{ label: "日志类型",
label:"金额", sortable: false,
sortable: false, prop: 'type'
prop:'money', },
align:'right', {
minWidth:200, label: "日志内容",
formatter:(v1,v2,value)=>{ sortable: false,
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') prop: 'remark'
},
{
label: "操作人",
sortable: false,
prop: 'admin.name'
},
{
label: "时间",
sortable: false,
prop: 'created_at',
width: 160,
formatter: (cell, data, value) => {
return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}')
}
} }
}, ],
{ signPlan: [],
label:'使用金额', planTypes: [],
sortable: false, planTable: [{
prop:'useMoney', prop: 'date',
align:'right', label: '日期',
minWidth:200, sortable: false,
formatter:(v1,v2,value)=>{ formatter: (cell, data, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') return parseTime(new Date(value), '{y}-{m}-{d}')
}
},
{
prop: 'money',
label: '金额(元)',
align: 'right',
minWidth: 180,
sortable: false,
formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
prop: 'content',
label: '内容',
align: 'left',
sortable: false,
},
{
prop: 'remark',
label: '备注',
align: 'left',
sortable: false,
} }
]
}
},
methods: {
async getPlanTypes() {
const res = await getparameter({
number: 'money_way'
})
this.planTypes = res.detail
},
async seeBuyProcess() {
if (!this.detail?.purchase_last_flow_id) {
Message({
type: "warning",
message: "还未进行采购申请",
duration: 2000
})
return
} }
], let res = await getOatoken()
journalTable:[ let url =
{ `${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.purchase_last_flow_id}?oatoken=${res.oatoken}`
label:'ID', let seeBuy = window.open(url, 'seeBuy',
sortable:false, `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
prop:'id' )
}, },
{ async seeBidding() {
label:"日志类型", if (!this.detail?.invite_last_flow_id) {
sortable:false, Message({
prop:'type' type: "warning",
}, message: "还未进行招标申请",
{ duration: 2000
label:"日志内容", })
sortable:false, return
prop:'remark'
},
{
label:"操作人",
sortable:false,
prop:'admin.name'
},
{
label:"时间",
sortable:false,
prop:'created_at',
width:160,
formatter:(cell,data,value)=>{
return parseTime(new Date(value),'{y}-{m}-{d} {h}:{i}')
}
} }
], let res = await getOatoken()
signPlan:[], let url =
planTypes:[], `${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.invite_last_flow_id}?oatoken=${res.oatoken}`
planTable:[ let seeBidding = window.open(url, 'seeBidding',
{ `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
prop:'date', )
label:'日期', },
sortable:false, async seeSignProcess() {
formatter:(cell,data,value)=>{ if (!this.detail?.join_last_flow_id) {
return parseTime(new Date(value),'{y}-{m}-{d}') Message({
} type: "warning",
}, message: "还未进行会签申请",
{ duration: 2000
prop:'money', })
label:'金额(元)', return
align:'right',
minWidth:180,
sortable:false,
formatter:(v1,v2,value)=>{
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
}
},
{
prop:'content',
label:'内容',
align:'left',
sortable:false,
},
{
prop:'remark',
label:'备注',
align:'left',
sortable:false,
} }
] let res = await getOatoken()
} let url =
}, `${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.join_last_flow_id}?oatoken=${res.oatoken}`
methods: { let seeSign = window.open(url, 'seeSign',
async getPlanTypes(){ `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
const res = await getparameter({number:'money_way'}) )
this.planTypes = res.detail
},
async seeBuyProcess(){ },
if(!this.detail?.purchase_last_flow_id){ async seeAskProcess() {
Message({ if (!this.detail?.req_last_flow_id) {
type:"warning", Message({
message:"还未进行采购申请", type: "warning",
duration:2000 message: "还未进行请示申请",
}) duration: 2000
return })
} 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 res = await getOatoken()
let seeBuy = window.open(url,'seeBuy',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`) let url =
}, `${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.req_last_flow_id}?oatoken=${res.oatoken}`
async seeBidding(){ let seeAsk = window.open(url, 'seeAsk',
if(!this.detail?.invite_last_flow_id){ `top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
Message({ )
type:"warning", },
message:"还未进行招标申请",
duration:2000 async getDetail(id) {
this.id = id
let res = await detailContract({
id: id
}) })
return this.detail = res
} let plans = res.plans
let res = await getOatoken() let linkPlan = res.plan_link
let url =`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.detail.invite_last_flow_id}?oatoken=${res.oatoken}` let linkPlanTable = plans.map(item => {
let seeBidding = window.open(url,'seeBidding',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`) let res = linkPlan.filter(item1 => {
}, return item1.plan_id === item.id
async seeSignProcess(){ })[0]
if(!this.detail?.join_last_flow_id){ return {
Message({ id: item.id,
type:"warning", type: item.type,
message:"还未进行会签申请", name: item.name,
duration:2000 money: item.money,
useMoney: res.use_money
}
}) })
return this.detail.plans = linkPlanTable
} console.log(this.detail)
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`)
}, let plan = await getContractSign({
async seeAskProcess(){ contract_id: id
if(!this.detail?.req_last_flow_id){
Message({
type:"warning",
message:"还未进行请示申请",
duration:2000
}) })
return this.signPlan = plan.data
} },
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})
this.detail = res
let plans = res.plans
let linkPlan = res.plan_link
let linkPlanTable = plans.map(item => {
let res = linkPlan.filter(item1 => {
return item1.plan_id === item.id
})[0]
return {
id:item.id,
type:item.type,
name:item.name,
money:item.money,
useMoney:res.use_money
}
})
this.detail.plans = linkPlanTable
console.log(this.detail)
let plan = await getContractSign({contract_id:id})
this.signPlan = plan.data
},
// //
deletePayPlan(row){ deletePayPlan(row) {
delContractSign({id:row.id}).then(res=>{ delContractSign({
this.getSignPlan() id: row.id
Message({ }).then(res => {
type:'success', this.getSignPlan()
message:"操作成功" Message({
type: 'success',
message: "操作成功"
})
}) })
}) },
}, },
}, computed: {
computed:{ typeFormatter() {
typeFormatter(){ return function(type) {
return function (type){ switch (type) {
switch (type){ case 1:
case 1: return "服务"
return "服务" break;
break; case 2:
case 2: return "货物"
return "货物" break;
break; case 3:
case 3: return "工程"
return "工程" break;
break; case 4:
case 4: return '其他'
return '其他' break;
break; default:
default: return "未知"
return "未知" }
}
},
moneyWayFormatter() {
return function(arr) {
let res = arr.map(item => {
return item.value
})
return res.toString()
}
},
moneyFormat() {
return function(money) {
return moneyFormatter(money)
} }
} }
}, },
moneyWayFormatter(){ mounted() {
return function (arr){ this.window.width = screen.availWidth * 0.95
let res = arr.map(item => { this.window.height = screen.availHeight * 0.95
return item.value this.window.top = (window.screen.height - 30 - this.window.height) / 2
}) this.window.left = (window.screen.width - 10 - this.window.width) / 2
return res.toString()
}
},
moneyFormat(){
return function (money){
return moneyFormatter(money)
}
} }
},
mounted() {
this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height)/2
this.window.left = (window.screen.width - 10 - this.window.width)/2
} }
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.contract-detail{ .contract-detail {
.base-info{ .base-info {
&-title{ &-title {
font-weight: 600; font-weight: 600;
padding: 0 10px; padding: 0 10px;
} }
&-item{
display: flex;
margin-top: 8px; &-item {
&-title{ display: flex;
padding: 0 20px; margin-top: 8px;
}
&-content{
} &-title {
&-unit{
padding: 0 20px;
}
&-content {}
&-unit {
margin-left: 20px; margin-left: 20px;
}
} }
} }
}
.link-budget-plan{ .link-budget-plan {
margin-top: 20px;
margin-top: 20px; &-title {
&-title{ @extend .base-info-title;
@extend .base-info-title;
padding-bottom: 10px; padding-bottom: 10px;
}
} }
}
.sign-info{ .sign-info {
&-title{ &-title {
@extend .link-budget-plan-title; @extend .link-budget-plan-title;
}
&-item{
@extend .base-info-item;
&-title{
@extend .base-info-item-title;
} }
&-content{
@extend .base-info-item-content; &-item {
} @extend .base-info-item;
&-unit{
@extend .base-info-item-unit; &-title {
@extend .base-info-item-title;
}
&-content {
@extend .base-info-item-content;
}
&-unit {
@extend .base-info-item-unit;
}
} }
} }
}
.pay-plan{ .pay-plan {
margin-top: 20px; margin-top: 20px;
&-title{
@extend .link-budget-plan-title; &-title {
@extend .link-budget-plan-title;
}
} }
}
.related-processes{ .related-processes {
margin-top: 20px; margin-top: 20px;
&-title{
@extend .link-budget-plan-title; &-title {
} @extend .link-budget-plan-title;
&-item{ }
//color: red;
display: flex; &-item {
//color: red;
&>div{ display: flex;
cursor: pointer;
margin: 0 20px; &>div {
cursor: pointer;
margin: 0 20px;
}
} }
} }
}
.journal{ .journal {
margin-top: 20px; margin-top: 20px;
&-title{
@extend .link-budget-plan-title; &-title {
@extend .link-budget-plan-title;
}
} }
} }
}
</style> </style>

@ -289,6 +289,18 @@
width: 36, width: 36,
type: "selection" type: "selection"
}, },
{
label: "科室",
prop: 'plan_department.name',
width: 100,
align: 'center'
},
{
label: "年份",
prop: 'year',
width: 80,
align: 'center'
},
{ {
label: "分类", label: "分类",
prop: 'type', prop: 'type',
@ -302,12 +314,14 @@
{ {
label: "名称", label: "名称",
prop: 'name', prop: 'name',
align: 'left' align: 'left',
width: 220,
}, },
{ {
label: "计划金额", label: "计划金额",
prop: 'money', prop: 'money',
align: 'right' align: 'right',
width: 120,
} }
], ],
planTotal: 0, planTotal: 0,

Loading…
Cancel
Save