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

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

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

Loading…
Cancel
Save