刘翔宇-旅管家 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,44 +109,58 @@
</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 {
getOatoken
} from "@/api/oatoken";
import {
Message
} from "element-ui";
import {
moneyFormatter
} from "@/utils"
import {
getparameter
} from "@/api/system/dictionary";
import detailContractSign from "./detailContractSign"
export default {
components: {
detailContractSign detailContractSign
}, },
data() { data() {
return { return {
window:{ window: {
width:0, width: 0,
height:0, height: 0,
top:0, top: 0,
left:0 left: 0
}, },
// //
id:'', id: '',
detail:null, detail: null,
isShowDetail:false, isShowDetail: false,
linkBudgetPlanTable:[ linkBudgetPlanTable: [{
{ label: "ID",
label:"ID", sortable: false,
sortable:false, prop: 'id',
prop:'id', width: 130
width:130
}, },
{ {
label:"类型", label: "类型",
width:100, width: 100,
sortable: false, sortable: false,
customFn:(row)=>{ customFn: (row) => {
const typeSwitch = (type) => { const typeSwitch = (type) => {
{ {
let res = this.planTypes.filter(item => { let res = this.planTypes.filter(item => {
@ -152,174 +169,188 @@ export default {
return res[0]?.value || '未知' return res[0]?.value || '未知'
} }
} }
return ( return ( <
<div> div >
<Tag color="primary"> <
{ Tag color = "primary" > {
typeSwitch(row.type) typeSwitch(row.type)
} } <
</Tag> /Tag> <
</div> /div>
) )
} }
}, },
{ {
label:"项目", label: "项目",
width: 140, width: 140,
sortable: false, sortable: false,
prop:'name' prop: 'name'
}, },
{ {
label:"金额", label: "金额",
sortable: false, sortable: false,
prop:'money', prop: 'money',
align:'right', align: 'right',
minWidth:200, minWidth: 200,
formatter:(v1,v2,value)=>{ formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
} }
}, },
{ {
label:'使用金额', label: '使用金额',
sortable: false, sortable: false,
prop:'useMoney', prop: 'useMoney',
align:'right', align: 'right',
minWidth:200, minWidth: 200,
formatter:(v1,v2,value)=>{ formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
} }
} }
], ],
journalTable:[ journalTable: [{
{ label: 'ID',
label:'ID', sortable: false,
sortable:false, prop: 'id'
prop:'id'
}, },
{ {
label:"日志类型", label: "日志类型",
sortable:false, sortable: false,
prop:'type' prop: 'type'
}, },
{ {
label:"日志内容", label: "日志内容",
sortable:false, sortable: false,
prop:'remark' prop: 'remark'
}, },
{ {
label:"操作人", label: "操作人",
sortable:false, sortable: false,
prop:'admin.name' prop: 'admin.name'
}, },
{ {
label:"时间", label: "时间",
sortable:false, sortable: false,
prop:'created_at', prop: 'created_at',
width:160, width: 160,
formatter:(cell,data,value)=>{ formatter: (cell, data, value) => {
return parseTime(new Date(value),'{y}-{m}-{d} {h}:{i}') return parseTime(new Date(value), '{y}-{m}-{d} {h}:{i}')
} }
} }
], ],
signPlan:[], signPlan: [],
planTypes:[], planTypes: [],
planTable:[ planTable: [{
{ prop: 'date',
prop:'date', label: '日期',
label:'日期', sortable: false,
sortable:false, formatter: (cell, data, value) => {
formatter:(cell,data,value)=>{ return parseTime(new Date(value), '{y}-{m}-{d}')
return parseTime(new Date(value),'{y}-{m}-{d}')
} }
}, },
{ {
prop:'money', prop: 'money',
label:'金额(元)', label: '金额(元)',
align:'right', align: 'right',
minWidth:180, minWidth: 180,
sortable:false, sortable: false,
formatter:(v1,v2,value)=>{ formatter: (v1, v2, value) => {
return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') return Number(value).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')
} }
}, },
{ {
prop:'content', prop: 'content',
label:'内容', label: '内容',
align:'left', align: 'left',
sortable:false, sortable: false,
}, },
{ {
prop:'remark', prop: 'remark',
label:'备注', label: '备注',
align:'left', align: 'left',
sortable:false, sortable: false,
} }
] ]
} }
}, },
methods: { methods: {
async getPlanTypes(){ async getPlanTypes() {
const res = await getparameter({number:'money_way'}) const res = await getparameter({
number: 'money_way'
})
this.planTypes = res.detail this.planTypes = res.detail
}, },
async seeBuyProcess(){ async seeBuyProcess() {
if(!this.detail?.purchase_last_flow_id){ if (!this.detail?.purchase_last_flow_id) {
Message({ Message({
type:"warning", type: "warning",
message:"还未进行采购申请", message: "还未进行采购申请",
duration:2000 duration: 2000
}) })
return return
} }
let res = await getOatoken() 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 url =
let seeBuy = window.open(url,'seeBuy',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`) `${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(){ async seeBidding() {
if(!this.detail?.invite_last_flow_id){ if (!this.detail?.invite_last_flow_id) {
Message({ Message({
type:"warning", type: "warning",
message:"还未进行招标申请", message: "还未进行招标申请",
duration:2000 duration: 2000
}) })
return return
} }
let res = await getOatoken() 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 url =
let seeBidding = window.open(url,'seeBidding',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`) `${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(){ async seeSignProcess() {
if(!this.detail?.join_last_flow_id){ if (!this.detail?.join_last_flow_id) {
Message({ Message({
type:"warning", type: "warning",
message:"还未进行会签申请", message: "还未进行会签申请",
duration:2000 duration: 2000
}) })
return return
} }
let res = await getOatoken() 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 url =
let seeSign = window.open(url,'seeSign',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`) `${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(){ async seeAskProcess() {
if(!this.detail?.req_last_flow_id){ if (!this.detail?.req_last_flow_id) {
Message({ Message({
type:"warning", type: "warning",
message:"还未进行请示申请", message: "还未进行请示申请",
duration:2000 duration: 2000
}) })
return return
} }
let res = await getOatoken() 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 url =
let seeAsk = window.open(url,'seeAsk',`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`) `${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
})
this.detail = res this.detail = res
let plans = res.plans let plans = res.plans
let linkPlan = res.plan_link let linkPlan = res.plan_link
@ -328,35 +359,39 @@ export default {
return item1.plan_id === item.id return item1.plan_id === item.id
})[0] })[0]
return { return {
id:item.id, id: item.id,
type:item.type, type: item.type,
name:item.name, name: item.name,
money:item.money, money: item.money,
useMoney:res.use_money useMoney: res.use_money
} }
}) })
this.detail.plans = linkPlanTable this.detail.plans = linkPlanTable
console.log(this.detail) console.log(this.detail)
let plan = await getContractSign({contract_id:id}) let plan = await getContractSign({
contract_id: id
})
this.signPlan = plan.data this.signPlan = plan.data
}, },
// //
deletePayPlan(row){ deletePayPlan(row) {
delContractSign({id:row.id}).then(res=>{ delContractSign({
id: row.id
}).then(res => {
this.getSignPlan() this.getSignPlan()
Message({ Message({
type:'success', type: 'success',
message:"操作成功" message: "操作成功"
}) })
}) })
}, },
}, },
computed:{ computed: {
typeFormatter(){ typeFormatter() {
return function (type){ return function(type) {
switch (type){ switch (type) {
case 1: case 1:
return "服务" return "服务"
break; break;
@ -374,16 +409,16 @@ export default {
} }
} }
}, },
moneyWayFormatter(){ moneyWayFormatter() {
return function (arr){ return function(arr) {
let res = arr.map(item => { let res = arr.map(item => {
return item.value return item.value
}) })
return res.toString() return res.toString()
} }
}, },
moneyFormat(){ moneyFormat() {
return function (money){ return function(money) {
return moneyFormatter(money) return moneyFormatter(money)
} }
} }
@ -391,88 +426,98 @@ export default {
mounted() { mounted() {
this.window.width = screen.availWidth * 0.95 this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95 this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height)/2 this.window.top = (window.screen.height - 30 - this.window.height) / 2
this.window.left = (window.screen.width - 10 - this.window.width)/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{
&-item {
display: flex; display: flex;
margin-top: 8px; margin-top: 8px;
&-title{
&-title {
padding: 0 20px; padding: 0 20px;
} }
&-content{
} &-content {}
&-unit{
&-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{
&-item {
@extend .base-info-item; @extend .base-info-item;
&-title{
&-title {
@extend .base-info-item-title; @extend .base-info-item-title;
} }
&-content{
&-content {
@extend .base-info-item-content; @extend .base-info-item-content;
} }
&-unit{
&-unit {
@extend .base-info-item-unit; @extend .base-info-item-unit;
} }
} }
} }
.pay-plan{ .pay-plan {
margin-top: 20px; margin-top: 20px;
&-title{
&-title {
@extend .link-budget-plan-title; @extend .link-budget-plan-title;
} }
} }
.related-processes{ .related-processes {
margin-top: 20px; margin-top: 20px;
&-title{
&-title {
@extend .link-budget-plan-title; @extend .link-budget-plan-title;
} }
&-item{
&-item {
//color: red; //color: red;
display: flex; display: flex;
&>div{ &>div {
cursor: pointer; cursor: pointer;
margin: 0 20px; margin: 0 20px;
@ -480,12 +525,13 @@ export default {
} }
} }
.journal{ .journal {
margin-top: 20px; margin-top: 20px;
&-title{
&-title {
@extend .link-budget-plan-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