master
xy 3 years ago
parent 346b909949
commit cd07bf67c3

@ -1,5 +1,5 @@
import request from "@/utils/request"
export function getOutDetail({ tbname,out_caigou_id,out_contract_id }) {
export function getOutDetail({ tbname,out_caigou_id,out_contract_id,out_pay_id }) {
return request({
method: 'get',
url: '/index.php',
@ -8,7 +8,8 @@ export function getOutDetail({ tbname,out_caigou_id,out_contract_id }) {
s: "/Api/flowDetail",
tbname,
out_caigou_id,
out_contract_id
out_contract_id,
out_pay_id
}
})
}

@ -46,7 +46,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同金额
</div>
<div class="xy-table-item-content xy-table-item-price">
<el-input placeholder="请填写合同金额" v-model="form.money" style="width: 300px;" />
<el-input-number :controls="false" :precision="2" placeholder="请填写合同金额" v-model="form.money" style="width: 300px;" />
</div>
</div>
</template>
@ -129,6 +129,14 @@
</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>
<Button type="primary" style="margin-left: 50px;" @click="form.contract_links.push({contract_id:contract.id,type_id:'',name:'',remark:''})"></Button>
</div>
<xy-table :list="form.contract_links instanceof Array ? form.contract_links : []" :table-item="linkTable">
<template v-slot:btns></template>
</xy-table>
<div class="base-info add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">付款计划</div>
<Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button>
@ -195,7 +203,6 @@
</template>
<script>
import { MessageBox } from 'element-ui';
import {
addContractSign,
getContractSign,
@ -212,6 +219,8 @@
parseTime,
moneyFormatter
} from "@/utils"
import { getOutDetail } from "@/api/out/index"
import { getparameter } from "@/api/system/dictionary"
import detailContractSign from "@/views/contract/components/detailContractSign";
import {
@ -224,6 +233,7 @@
},
data() {
return {
linTypes: [],
form: {
number: '',
supply: '',
@ -235,7 +245,8 @@
date: "",
is_assurance: false,
assurance_money:'',
assurance_expire:''
assurance_expire:'',
contract_links:[]
},
rules: {
number: [{
@ -341,10 +352,70 @@
message: '必须为数字'
}
]
}
},
linkTable:[
{
prop: "",
width: 140,
label: "关联方类型",
customFn:row => {
return (
<el-select size="small" v-model={row.type_id}>
{
this.linTypes.map(i => {
return (
<el-option value={i.id} label={i.value}></el-option>
)
})
}
</el-select>
)
}
},
{
prop: "name",
label: "名称",
width: 140,
customFn:row => {
return (
<el-input size="small" v-model={row.name}></el-input>
)
}
},
{
prop: "remark",
label: "备注",
minWidth: 180,
customFn:row => {
return (
<el-input size="small" v-model={row.remark}></el-input>
)
}
},
{
label: "操作",
width: 80,
customFn:(row,scope) => {
return (
<Button type="primary"
size="small"
on={{
['click']:e => {
this.form.contract_links.splice(scope.$index,1)
}
}}>删除</Button>
)
}
}
]
}
},
methods: {
async getLinkTypes() {
const res = await getparameter({number:"linkType"})
this.linTypes = res.detail
},
//
sign() {
console.log(this.signList)
@ -371,7 +442,8 @@
date: this.form.date,
is_assurance: this.form.is_assurance,
assurance_money:this.form.assurance_money,
assurance_expire:this.form.assurance_expire
assurance_expire:this.form.assurance_expire,
contract_links:this.form.contract_links,
}).then(res => {
this.isShow = false
Message({
@ -404,6 +476,7 @@
this.form.is_assurance = res.is_assurance === 1
this.form.assurance_expire = res.assurance_expire
this.form.assurance_money = res.assurance_money
this.form.contract_links = res.contract_links || []
console.log(this.form)
},
deleteContractSign(row) {
@ -437,29 +510,41 @@
})
},
async getOutContract() {
const res = await getOutDetail({ tbname: 'hetong', out_contract_id: this.contract.id })
console.log(res)
this.form.number = res.flow?.serial
this.form.money = Number(res.flow_detail?.total)
},
//oa
async getOaContractInfo() {
try {
let res = await getOatoken()
let url =
`${process.env.VUE_APP_OUT_URL}/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['合同金额(元)'])
this.form.number = oaInfo.data.flow['合同编号']
this.form.supply = oaInfo.data.flow['承包商\\供应商']
this.form.carryDepartment = oaInfo.data.flow['执行部门']
} catch {
}
}
// async getOaContractInfo() {
// try {
// let res = await getOatoken()
// let url =
// `${process.env.VUE_APP_OUT_URL}/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[''])
// this.form.number = oaInfo.data.flow['']
// this.form.supply = oaInfo.data.flow['\\']
// this.form.carryDepartment = oaInfo.data.flow['']
// } catch {
//
// }
//
// }
},
watch: {
async contractId() {
await this.getContractSignList()
await this.getContract()
await this.getOaContractInfo()
async isShow(val) {
if(val){
await this.getContractSignList()
await this.getContract()
//await this.getOaContractInfo()
await this.getOutContract()
}
}
},
created() {
this.getLinkTypes()
}
}
</script>

@ -146,6 +146,43 @@
</div>
</div>
</div>
<div class="out-sign-info" v-if="outPayDetail.flow_detail">
<div class="sign-info-title">付款信息</div>
<div class="sign-info-item">
<div class="sign-info-item-title">状态</div>
<div class="sign-info-item-content">
{{ statusFormat(outPayDetail.flow.current_step) }}
</div>
</div>
<div class="sign-info-item">
<div class="sign-info-item-title">总价</div>
<div class="sign-info-item-content">
{{ moneyFormat(outPayDetail.flow_detail.zongjia) }}
</div>
<div class="sign-info-item-unit"></div>
</div>
<div style="display: flex; justify-content: space-between">
<div class="sign-info-item" style="flex-basis: 50%">
<div class="sign-info-item-title">已支付次数</div>
<div class="sign-info-item-content">
{{ outPayDetail.flow_detail.yizhifucishu }}
</div>
</div>
<div class="sign-info-item" style="flex-basis: 50%">
<div class="sign-info-item-title">已支付金额</div>
<div class="sign-info-item-content">
{{ outPayDetail.flow_detail.yizhifujine }}
</div>
<div class="sign-info-item-unit"></div>
</div>
<div class="sign-info-item" style="flex-basis: 50%">
<div class="sign-info-item-title">总支付次数</div>
<div class="sign-info-item-content">
{{ outPayDetail.flow_detail.zhifucishu }}
</div>
</div>
</div>
</div>
<div class="pay-plan">
<div class="pay-plan-title">付款计划</div>
<xy-table
@ -164,43 +201,43 @@
>
</xy-table>
</div>
<div class="related-processes">
<div class="related-processes-title">相关流程进展查看</div>
<div class="related-processes-item">
<div
@click="toOutDetail('caigou')"
:style="{ color: detail.purchase_last_flow_id ? 'green' : 'red' }"
>
采购流程查看
</div>
<div
@click="toOutDetail('hetong')"
:style="{ color: detail.join_last_flow_id ? 'green' : 'red' }"
>
合同会签流程查看
</div>
<template
v-if="
detail.purchase_way && detail.purchase_way.remark === 'true'
"
>
<div
@click="seeBidding"
:style="{ color: detail.invite_last_flow_id ? 'green' : 'red' }"
>
招标审批流程查看
</div>
</template>
<template v-if="detail.is_plan != 1">
<div
@click="seeAskProcess"
:style="{ color: detail.req_last_flow_id ? 'green' : 'red' }"
>
请示流程查看
</div>
</template>
</div>
</div>
<!-- <div class="related-processes">-->
<!-- <div class="related-processes-title">相关流程进展查看</div>-->
<!-- <div class="related-processes-item">-->
<!-- <div-->
<!-- @click="toOutDetail('caigou')"-->
<!-- :style="{ color: detail.purchase_last_flow_id ? 'green' : 'red' }"-->
<!-- >-->
<!-- 采购流程查看-->
<!-- </div>-->
<!-- <div-->
<!-- @click="toOutDetail('hetong')"-->
<!-- :style="{ color: detail.join_last_flow_id ? 'green' : 'red' }"-->
<!-- >-->
<!-- 合同会签流程查看-->
<!-- </div>-->
<!-- <template-->
<!-- v-if="-->
<!-- detail.purchase_way && detail.purchase_way.remark === 'true'-->
<!-- "-->
<!-- >-->
<!-- <div-->
<!-- @click="seeBidding"-->
<!-- :style="{ color: detail.invite_last_flow_id ? 'green' : 'red' }"-->
<!-- >-->
<!-- 招标审批流程查看-->
<!-- </div>-->
<!-- </template>-->
<!-- <template v-if="detail.is_plan != 1">-->
<!-- <div-->
<!-- @click="seeAskProcess"-->
<!-- :style="{ color: detail.req_last_flow_id ? 'green' : 'red' }"-->
<!-- >-->
<!-- 请示流程查看-->
<!-- </div>-->
<!-- </template>-->
<!-- </div>-->
<!-- </div>-->
<div class="journal">
<div class="journal-title">日志</div>
<xy-table
@ -269,12 +306,10 @@ export default {
sortable: false,
customFn: (row) => {
const typeSwitch = (type) => {
{
let res = this.planTypes.filter((item) => {
return item.id === type;
});
return res[0]?.value || "未知";
}
let res = this.planTypes.filter((item) => {
return item.id === type;
});
return res[0]?.value || "未知";
};
return (
<div>
@ -385,6 +420,7 @@ export default {
//out
outContractDetail: {},
outCaigouDetail: {},
outPayDetail: {},
};
},
methods: {
@ -540,6 +576,17 @@ export default {
return moneyFormatter(money);
};
},
statusFormat() {
return function (status) {
if(status === 'end') {
return "已办结"
}
if(Number(status)) {
return "进行中"
}
return "待办理"
}
}
},
watch: {
isShowDetail(val) {
@ -554,6 +601,11 @@ export default {
this.outCaigouDetail = res;
}
);
getOutDetail({ tbname: "pay", out_pay_id: this.id }).then(
(res) => {
this.outPayDetail = res;
}
);
}
},
},
@ -563,6 +615,9 @@ export default {
this.window.top = (window.screen.height - 30 - this.window.height) / 2;
this.window.left = (window.screen.width - 10 - this.window.width) / 2;
},
created() {
this.getPlanTypes();
}
};
</script>

@ -163,15 +163,23 @@
<!-- 如果是 履约文件-->
<template v-if="scope.row.assurance_status==1">
<!-- 那么必须财务审核通过-->
<Button class="slot-btns-item" size="small" type="primary"
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true">
<Button class="slot-btns-item"
size="small"
type="primary"
@click="paying(scope.row)">
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记
</Button>
</template>
</template>
<template v-else>
<Button class="slot-btns-item" size="small" type="primary"
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true">
<Button class="slot-btns-item"
size="small"
type="primary"
@click="paying(scope.row)">
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记
</Button>
</template>
@ -228,7 +236,7 @@
</template>
<template v-if="hasEdit&&scope.row.status === 2">
<Button class="slot-btns-item" size="small" type="primary"
@click="$refs['contractSign'].isShow = true,$refs['contractSign'].contractId = scope.row.id">
@click="$refs['contractSign'].contractId = scope.row.id,$refs['contractSign'].isShow = true">
签订修改
</Button>
</template>
@ -1571,6 +1579,24 @@ export default {
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
//
async paying(row) {
// this.setNowContract(row,'pay')
let baseInfo = {
"title": row?.name,
"type": this.type.filter(item => {
return item.value === row.type
})[0]?.label,
"hetongbianhao": row?.number,
"out_pay_id": row.id,
//"\\":row.supply
}
let url =
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/24&id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
let signProcess = window.open(url, 'signProcess',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
//
async askProcess(row) {
let res = await getOatoken()

Loading…
Cancel
Save