master
271556543@qq.com 3 years ago
parent 1478f67ab7
commit e30862f328

@ -2,9 +2,9 @@
ENV = 'development'
# base api
VUE_APP_DOMIAN=http://192.168.60.99:9003/
#VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
#VUE_APP_DOMIAN=http://192.168.60.99:9003/
VUE_APP_DOMIAN=http://hdcontract.ali251.langye.net/
VUE_APP_BASE_API = ''
#VUE_APP_OUT_URL = http://suzhouhedaooa.langye.net
VUE_APP_OUT_URL = http://suzhouhedaooa.langye.net
VUE_APP_OUT_URL = http://192.168.60.18:2021
#VUE_APP_OUT_URL = http://192.168.60.18:2021

@ -1,6 +1,6 @@
<template>
<div>
<xy-dialog :is-show.sync="isShow" title="付款计划">
<xy-dialog :is-show.sync="isShow" title="付款计划" @on-ok="isShow = false">
<template v-slot:normalContent>
<xy-table :height="300" :list="list" :table-item="table">
<template v-slot:btns>
@ -14,7 +14,7 @@
<script>
import {getContractSign} from "@/api/contractSign/contractSign"
import {parseTime} from "@/utils";
import {parseTime,moneyFormatter} from "@/utils";
export default {
data() {
return {
@ -30,7 +30,10 @@ export default {
prop:'money',
label:'计划付款金额(元)',
align:'right',
width:168
width:168,
formatter:(cell,data,value)=>{
return moneyFormatter(value)
}
},
{
prop:'date',

@ -50,6 +50,44 @@
</div>
</div>
</template>
<template v-slot:time>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同服务时间
</div>
<div class="xy-table-item-content">
<el-date-picker
style="width: 300px;"
value-format="yyyy-MM-dd"
v-model="form.time"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</div>
</template>
<template v-slot:guaranteeMoney>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>质保金
</div>
<div class="xy-table-item-content xy-table-item-price">
<el-input-number :precision="2" :controls="false" placeholder="请填写质保金" v-model="form.guaranteeMoney" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:guaranteeYear>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>质保期
</div>
<div class="xy-table-item-content xy-table-item-year">
<el-input-number :controls="false" placeholder="请填写质保期" v-model="form.guaranteeYear" style="width: 300px;"/>
</div>
</div>
</template>
<template v-slot:extraFormBottom>
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">付款计划</div>
@ -117,7 +155,7 @@
import {addContractSign,getContractSign,delContractSign} from "@/api/contractSign/contractSign";
import {detailContract,editorContract} from "@/api/contract/contract";
import {Message} from "element-ui";
import {parseTime} from "@/utils"
import {parseTime,moneyFormatter} from "@/utils"
import detailContractSign from "@/views/contract/components/detailContractSign";
import {getOatoken} from "@/api/oatoken";
@ -132,7 +170,10 @@ export default {
number:'',
supply:'',
carryDepartment:'',
money:''
money:'',
time:[],
guaranteeMoney:'',
guaranteeYear:'',
},
rules:{
number:[
@ -147,6 +188,15 @@ export default {
money:[
{required:true,message:"必填"},
{pattern:/^\d+(\.\d+)?$/, message: '必须为数字'}
],
time:[
{required:true,message:"必选"}
],
guaranteeMoney:[
{required:true,message:"必填"}
],
guaranteeYear:[
{required:true,message:"必填"}
]
},
@ -170,6 +220,9 @@ export default {
align:'right',
width: 120,
sortable:false,
formatter:(v1,v2,value)=>{
return moneyFormatter(value)
}
},
{
prop:'content',
@ -217,7 +270,11 @@ export default {
supply:this.form.supply,
carry_department:this.form.carryDepartment,
money:this.form.money,
status:2
status:2,
guarantee_money:this.form.guaranteeMoney,
guarantee_year:this.form.guaranteeYear,
start_date:this.form.time[0],
end_date:this.form.time[1]
}).then(res=>{
this.isShow = false
Message({
@ -266,7 +323,7 @@ export default {
let res = await getOatoken()
let url =`/oa/admin/flow/view/${this.contract.join_last_flow_id}?oatoken=${res.oatoken}&get_raw=1`
const oaInfo = await axios.get(url)
this.form.money = Number(oaInfo.data.flow['合同金额(万元)'])/10000
this.form.money = Number(oaInfo.data.flow['合同金额(万元)'])*10000
this.form.number = oaInfo.data.flow['合同编号']
this.form.supply = oaInfo.data.flow['承包商\\供应商']
this.form.carryDepartment = oaInfo.data.flow['执行部门']
@ -338,4 +395,16 @@ export default {
z-index: 2;
}
}
.xy-table-item-year{
position: relative;
&::after{
position: absolute;
right: 4%;
top: 0;
content:'年'
}
}
::v-deep .el-input__inner{
text-align: left;
}
</style>

@ -45,7 +45,7 @@
<div class="sign-info-title">签订信息</div>
<div class="sign-info-item">
<div class="sign-info-item-title">合同金额</div>
<div class="sign-info-item-content">{{detail.money}}</div>
<div class="sign-info-item-content">{{moneyFormat(detail.money)}}</div>
<div class="sign-info-item-unit"></div>
</div>
<div style="display: flex;justify-content: space-between">

@ -73,7 +73,7 @@
<div class="xy-table-item-content">
<el-select placeholder="选择款项类型或直接录入其他类型"
v-model="paymentRegistrationForm.type"
style="width: 200px;"
style="width: 300px;"
filterable
allow-create
clearable>
@ -228,7 +228,7 @@ export default {
//
percentPay(){
let total = this.totalMoney()
return (total/this.contract.money)*100 || 0
return ((total/this.contract.money)*100).toFixed(2) || 0
},
//

@ -9,7 +9,7 @@
<div style="grid-area: tb1-1" class="print-table1-grid-top">项目名称<span style="font-weight: 600">{{registration.contract.name}}</span></div>
<div style="grid-area: tb1-2;justify-content: center;align-items: center;" >本次为第 <span style="font-weight: 600;padding: 0 1vw;">{{payIndex}}</span> 次付款</div>
<div style="grid-area: tb2-1" class="print-table1-grid-top">承包商/供货商<span style="font-weight: 600">{{registration.contract.supply}}</span></div>
<div style="grid-area: tb2-2" class="print-table1-grid-top">合同服务时间<span style="font-weight: 600">{{dateFormat(registration.created_at)}}</span></div>
<div style="grid-area: tb2-2" class="print-table1-grid-top">合同服务时间<span style="font-weight: 600">{{registration.contract.start_date}} - {{registration.contract.end_date}}</span></div>
<div style="grid-area: tb3-1" class="print-table1-grid-title1">付款情形</div>
<div style="grid-area: tb3-2" class="print-table1-grid-title1">金额单位</div>
@ -49,17 +49,19 @@
</div>
<div style="grid-area: tb9-1" class="print-table1-grid-center">F</div>
<div style="grid-area: tb9-2" class="print-table1-grid-center">累计支付</div>
<div style="grid-area: tb9-3"></div>
<div style="grid-area: tb9-3" class="print-table1-grid-center">{{priceFormat(registration.total_use_money)}}</div>
<div style="grid-area: tb9-4"></div>
<div style="grid-area: tb10-1" class="print-table1-grid-center">G</div>
<div style="grid-area: tb10-2" class="print-table1-grid-center">累计扣款</div>
<div style="grid-area: tb10-3"></div>
<div style="grid-area: tb10-3" class="print-table1-grid-center">{{priceFormat(registration.total_new_money)}}</div>
<div style="grid-area: tb10-4"></div>
<div style="grid-area: tb11-1" class="print-table1-grid-center">H</div>
<div style="grid-area: tb11-2" class="print-table1-grid-center">质保金</div>
<div style="grid-area: tb11-3;align-items: center;"><span style="padding-left: 2vw;"></span>%质保期<span style="padding-left: 2vw;"></span>需审计的以审计价为计费依据</div>
<div style="grid-area: tb11-3;align-items: center;">{{guaranteeRate(registration.contract.guarantee_money,registration.contract.money)}}%质保期{{registration.contract.guarantee_year}}需审计的以审计价为计费依据</div>
<div style="grid-area: tb12" class="print-table1-grid-bottom1">资金列支渠道</div>
<div style="grid-area: tb12" class="print-table1-grid-bottom1">
资金列支渠道{{moneyWayFormat(registration.money_way_detail)}}
</div>
<div style="grid-area: tb13-1;" class="print-table1-grid-bottom2">
<div>
@ -74,7 +76,7 @@
<div style="grid-area: tb14-3;" class="print-table1-grid-bottom3">单位负责人</div>
</div>
<div style="text-align: right;padding-top: 4px;font-size: 20px;">打印时间{{new Date().getFullYear()}}.{{new Date().getMonth()+1}}.{{new Date().getDate()}}</div>
<div style="text-align: right;padding-top: 0.3vw;font-size: 1.5vw;">打印时间{{new Date().getFullYear()}}.{{new Date().getMonth()+1}}.{{new Date().getDate()}}</div>
</div>
</template>
</xy-dialog>
@ -87,7 +89,7 @@ import {detailFundLog,getFundLog} from "@/api/paymentRegistration/fundLog"
import html2canvas from 'html2canvas'
import * as printJS from "print-js";
import {parseTime} from "@/utils";
import {parseTime,moneyRecovery} from "@/utils";
export default {
data() {
@ -99,6 +101,16 @@ export default {
}
},
methods: {
moneyWayFormat(arr){
let res = arr.map(item => {
return item.value
})
return res.toString()
},
guaranteeRate(gua,money){
return ((moneyRecovery(gua) / money) * 100).toFixed(4)
},
async getDetailFundLog(id){
let res = await detailFundLog({id})
this.registration = res
@ -151,7 +163,7 @@ export default {
.print-table1{
box-sizing: border-box;
&-title{
font-size: 28px;
font-size: 2vw;
letter-spacing: 2px;
text-align: center;
font-weight: 600;
@ -161,7 +173,7 @@ export default {
}
&-grid{
font-size: 24px;
font-size: 1.75vw;
border: 1px #000 solid;
display: grid;
grid-template-rows: repeat(14,auto);

@ -810,7 +810,7 @@ export default {
async bidding(row){
let baseInfo = {
"项目名称":row?.name,
"项目预算(万元)":row?.plan_price
"项目预算(万元)":row?.plan_price/10000
}
let res = await getOatoken()
let url =`${process.env.VUE_APP_OUT_URL}/admin/flow/create/27?oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
@ -827,7 +827,7 @@ export default {
return item.value === row.type
})[0]?.label,
"资金渠道":row?.money_way?.value,
"项目预算(万元)":row?.plan_price
"项目预算(万元)":row?.plan_price/10000
}
let res = await getOatoken()
let url = `${process.env.VUE_APP_OUT_URL}/admin/flow/create/2?oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
@ -838,7 +838,7 @@ export default {
let baseInfo = {
"合同名称":row?.name,
"执行部门":row?.carry_department,
"合同金额(万元)":row?.money,
"合同金额(万元)":row?.money/10000,
//"\\":row.supply
}
let res = await getOatoken()

@ -13,7 +13,7 @@
</div>
<div class="payment-registration-row">
<div class="payment-registration-row-title">合同金额</div>
<div class="payment-registration-row-content">{{contract.money}}</div>
<div class="payment-registration-row-content">{{moneyFormat(contract.money)}} </div>
</div>
<div style="display: flex">
<div class="payment-registration-row">
@ -95,7 +95,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>是否为预算内确定项目
</div>
<div class="xy-table-item-content">
<el-switch disabled v-model="paymentRegistrationForm.isLast"/>
<el-switch v-model="paymentRegistrationForm.isLast"/>
</div>
</div>
</template>
@ -109,13 +109,25 @@
</div>
</div>
</template>
<template v-slot:moneyWay>
<div class="xy-table-item">
<div class="xy-table-item-label">
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>资金列支渠道
</div>
<div class="xy-table-item-content">
<el-select multiple style="width: 300px;" v-model="paymentRegistrationForm.moneyWay" placeholder="请选择资金列支渠道">
<el-option v-for="item in planTypes" :value="item.id" :label="item.value"></el-option>
</el-select>
</div>
</div>
</template>
<template v-slot:extraFormBottom>
<Input search enter-button=" " placeholder="搜索预算计划.." v-model="searchContent" @on-search="getBudgets"/>
<xy-table :list="plans" :show-index="false" :table-item="planTable" :height="310" style="margin-top: 10px;" ref="planTable" @select="selectPlan">
<template v-slot:btns>
<el-table-column label="使用金额" header-align="center">
<template slot-scope="scope">
<Input disabled :value="scope.row.use_money" @input="(e)=>scope.row.use_money = e"/>
<Input :value="scope.row.use_money" @input="inputMoney($event,scope.row)"/>
</template>
</el-table-column>
</template>
@ -135,7 +147,7 @@ import {getFundLog,detailFundLog,editorFundLog} from "@/api/paymentRegistration/
import {getBudget} from "@/api/budget/budget";
import {detailContract} from "@/api/contract/contract";
import {Message} from "element-ui";
import {parseTime} from "@/utils";
import {parseTime,moneyFormatter} from "@/utils";
export default {
data() {
@ -174,7 +186,8 @@ export default {
type:"",
isLast:false,
plan:[],
actMoney:''
actMoney:'',
moneyWay:'',//
},
paymentRegistrationRules:{
applyMoney:[
@ -191,16 +204,16 @@ export default {
actMoney:[
{required:true,message:"必填"},
{pattern:/^\d+(\.\d+)?$/, message: '必须为数字'}
],
moneyWay:[
{required:true,message:"必填"}
]
},
planTable:[
{
sortable:false,
width:36,
type:'selection',
selectable:()=>{
return false
}
type:'selection'
},
{
label:"分类",
@ -226,6 +239,14 @@ export default {
}
},
methods: {
inputMoney(e,row){
row.useMoney = e
this.paymentRegistrationForm.plan.forEach(item => {
if(item.plan_id == row.id){
item.use_money = e
}
})
},
async getPlanTypes(){
const res = await getparameter({number:'money_way'})
this.planTypes = res.detail
@ -242,12 +263,12 @@ export default {
this.payment.map(item => {
total += Number(item.act_money)
})
return total.toFixed(2)
return moneyFormatter(total)
},
//
percentPay(){
let total = this.totalMoney()
return (total/this.contract.money)*100 || 0
return ((total/this.contract.money)*100).toFixed(2) || 0
},
async getRegistration(id){
@ -270,8 +291,6 @@ export default {
const res = await getFundLog({contract_id:this.contract.id})
this.payment = res.data
if(!this.paymentRegistrationForm.isLast) return
this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
return item.plan_id
}))
@ -283,11 +302,12 @@ export default {
id:this.registrationId,
contract_id:this.contract.id,
act_money:this.paymentRegistrationForm.actMoney,
status:1
status:1,
money_way_id:this.paymentRegistrationForm.moneyWay.toString(),
contract_plan_links:this.paymentRegistrationForm.plan
}).then(res=>{
this.$emit('refresh')
this.isShow = false
this.paymentRegistrationForm.actMoney = ''
Message({
type:'success',
message:'操作成功'
@ -298,14 +318,12 @@ export default {
//
//
async getBudgets(){
let res = await getBudget({name:this.searchContent,page_size:10,page:this.pageIndex})
let res = await getBudget({name:this.searchContent,page_size:10,page:this.plansPageIndex})
this.plans = res.list.data
this.planTotal = res.list.total
if(!this.paymentRegistrationForm.is_end) return
this.toggleSelection(this.paymentRegistrationForm.plan.map(item => {
return item.plan_id
return item.value.plan_id
}))
},
planPageChange(e){
@ -325,25 +343,39 @@ export default {
this.paymentRegistrationForm.plan = []
}
},
//
toggleSelection(plans) {
//console.log(this.paymentRegistrationForm)
if (plans) {
plans.map((plan,index) => {
let list = this.plans.map(item => {return item.id})
if(list.indexOf(plan) != -1){
this.plans[list.indexOf(plan)].use_money = this.paymentRegistrationForm.plan[index].use_money
}
})
this.plans.filter(plan => {
return plans.includes(plan.id)
if(plans.includes(plan.id)){
plan.useMoney = this.paymentRegistrationForm.plan[plans.indexOf(plan.id)].value.use_money
return true
}
}).map(row => {
this.$refs.planTable.toggleRowSelection(row);
this.$refs.planTable.toggleRowSelection(row)
})
} else {
this.$refs.planTable.clearSelection();
this.$refs.planTable.clearSelection()
}
},
},
computed:{
moneyFormat(){
return function (money){
return moneyFormatter(money)
}
}
},
watch:{
isShow(newVal){
if(!newVal){
this.paymentRegistrationForm.actMoney = ''
this.paymentRegistrationForm.moneyWay = ''
this.paymentRegistrationForm.plan = []
this.$refs.planTable.clearSelection()
}
}
},
async mounted() {
await this.getBudgets()
await this.getPlanTypes()

Loading…
Cancel
Save