master
xy 3 years ago
parent 346b909949
commit cd07bf67c3

@ -1,5 +1,5 @@
import request from "@/utils/request" 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({ return request({
method: 'get', method: 'get',
url: '/index.php', url: '/index.php',
@ -8,7 +8,8 @@ export function getOutDetail({ tbname,out_caigou_id,out_contract_id }) {
s: "/Api/flowDetail", s: "/Api/flowDetail",
tbname, tbname,
out_caigou_id, 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>合同金额 <span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同金额
</div> </div>
<div class="xy-table-item-content xy-table-item-price"> <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>
</div> </div>
</template> </template>
@ -129,6 +129,14 @@
</div> </div>
</template> </template>
<template v-slot:extraFormBottom> <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 add-plan" style="margin-top: 20px;margin-bottom: 20px">
<div class="base-info-title">付款计划</div> <div class="base-info-title">付款计划</div>
<Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button> <Button type="primary" style="margin-left: 50px;" @click="isShowAddPlan = true">新增计划</Button>
@ -195,7 +203,6 @@
</template> </template>
<script> <script>
import { MessageBox } from 'element-ui';
import { import {
addContractSign, addContractSign,
getContractSign, getContractSign,
@ -212,6 +219,8 @@
parseTime, parseTime,
moneyFormatter moneyFormatter
} from "@/utils" } from "@/utils"
import { getOutDetail } from "@/api/out/index"
import { getparameter } from "@/api/system/dictionary"
import detailContractSign from "@/views/contract/components/detailContractSign"; import detailContractSign from "@/views/contract/components/detailContractSign";
import { import {
@ -224,6 +233,7 @@
}, },
data() { data() {
return { return {
linTypes: [],
form: { form: {
number: '', number: '',
supply: '', supply: '',
@ -235,7 +245,8 @@
date: "", date: "",
is_assurance: false, is_assurance: false,
assurance_money:'', assurance_money:'',
assurance_expire:'' assurance_expire:'',
contract_links:[]
}, },
rules: { rules: {
number: [{ number: [{
@ -341,10 +352,70 @@
message: '必须为数字' 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: { methods: {
async getLinkTypes() {
const res = await getparameter({number:"linkType"})
this.linTypes = res.detail
},
// //
sign() { sign() {
console.log(this.signList) console.log(this.signList)
@ -371,7 +442,8 @@
date: this.form.date, date: this.form.date,
is_assurance: this.form.is_assurance, is_assurance: this.form.is_assurance,
assurance_money:this.form.assurance_money, 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 => { }).then(res => {
this.isShow = false this.isShow = false
Message({ Message({
@ -404,6 +476,7 @@
this.form.is_assurance = res.is_assurance === 1 this.form.is_assurance = res.is_assurance === 1
this.form.assurance_expire = res.assurance_expire this.form.assurance_expire = res.assurance_expire
this.form.assurance_money = res.assurance_money this.form.assurance_money = res.assurance_money
this.form.contract_links = res.contract_links || []
console.log(this.form) console.log(this.form)
}, },
deleteContractSign(row) { deleteContractSign(row) {
@ -437,30 +510,42 @@
}) })
}, },
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 //oa
async getOaContractInfo() { // async getOaContractInfo() {
try { // try {
let res = await getOatoken() // let res = await getOatoken()
let url = // let url =
`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.contract.join_last_flow_id}?oatoken=${res.oatoken}&get_raw=1` // `${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) // const oaInfo = await axios.get(url)
this.form.money = Number(oaInfo.data.flow['合同金额(元)']) // this.form.money = Number(oaInfo.data.flow[''])
this.form.number = oaInfo.data.flow['合同编号'] // this.form.number = oaInfo.data.flow['']
this.form.supply = oaInfo.data.flow['承包商\\供应商'] // this.form.supply = oaInfo.data.flow['\\']
this.form.carryDepartment = oaInfo.data.flow['执行部门'] // this.form.carryDepartment = oaInfo.data.flow['']
} catch { // } catch {
//
} // }
//
} // }
}, },
watch: { watch: {
async contractId() { async isShow(val) {
if(val){
await this.getContractSignList() await this.getContractSignList()
await this.getContract() await this.getContract()
await this.getOaContractInfo() //await this.getOaContractInfo()
await this.getOutContract()
} }
} }
},
created() {
this.getLinkTypes()
}
} }
</script> </script>

@ -146,6 +146,43 @@
</div> </div>
</div> </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">
<div class="pay-plan-title">付款计划</div> <div class="pay-plan-title">付款计划</div>
<xy-table <xy-table
@ -164,43 +201,43 @@
> >
</xy-table> </xy-table>
</div> </div>
<div class="related-processes"> <!-- <div class="related-processes">-->
<div class="related-processes-title">相关流程进展查看</div> <!-- <div class="related-processes-title">相关流程进展查看</div>-->
<div class="related-processes-item"> <!-- <div class="related-processes-item">-->
<div <!-- <div-->
@click="toOutDetail('caigou')" <!-- @click="toOutDetail('caigou')"-->
:style="{ color: detail.purchase_last_flow_id ? 'green' : 'red' }" <!-- :style="{ color: detail.purchase_last_flow_id ? 'green' : 'red' }"-->
> <!-- >-->
采购流程查看 <!-- 采购流程查看-->
</div> <!-- </div>-->
<div <!-- <div-->
@click="toOutDetail('hetong')" <!-- @click="toOutDetail('hetong')"-->
:style="{ color: detail.join_last_flow_id ? 'green' : 'red' }" <!-- :style="{ color: detail.join_last_flow_id ? 'green' : 'red' }"-->
> <!-- >-->
合同会签流程查看 <!-- 合同会签流程查看-->
</div> <!-- </div>-->
<template <!-- <template-->
v-if=" <!-- v-if="-->
detail.purchase_way && detail.purchase_way.remark === 'true' <!-- detail.purchase_way && detail.purchase_way.remark === 'true'-->
" <!-- "-->
> <!-- >-->
<div <!-- <div-->
@click="seeBidding" <!-- @click="seeBidding"-->
:style="{ color: detail.invite_last_flow_id ? 'green' : 'red' }" <!-- :style="{ color: detail.invite_last_flow_id ? 'green' : 'red' }"-->
> <!-- >-->
招标审批流程查看 <!-- 招标审批流程查看-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template v-if="detail.is_plan != 1"> <!-- <template v-if="detail.is_plan != 1">-->
<div <!-- <div-->
@click="seeAskProcess" <!-- @click="seeAskProcess"-->
:style="{ color: detail.req_last_flow_id ? 'green' : 'red' }" <!-- :style="{ color: detail.req_last_flow_id ? 'green' : 'red' }"-->
> <!-- >-->
请示流程查看 <!-- 请示流程查看-->
</div> <!-- </div>-->
</template> <!-- </template>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
<div class="journal"> <div class="journal">
<div class="journal-title">日志</div> <div class="journal-title">日志</div>
<xy-table <xy-table
@ -269,12 +306,10 @@ export default {
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) => {
return item.id === type; return item.id === type;
}); });
return res[0]?.value || "未知"; return res[0]?.value || "未知";
}
}; };
return ( return (
<div> <div>
@ -385,6 +420,7 @@ export default {
//out //out
outContractDetail: {}, outContractDetail: {},
outCaigouDetail: {}, outCaigouDetail: {},
outPayDetail: {},
}; };
}, },
methods: { methods: {
@ -540,6 +576,17 @@ export default {
return moneyFormatter(money); return moneyFormatter(money);
}; };
}, },
statusFormat() {
return function (status) {
if(status === 'end') {
return "已办结"
}
if(Number(status)) {
return "进行中"
}
return "待办理"
}
}
}, },
watch: { watch: {
isShowDetail(val) { isShowDetail(val) {
@ -554,6 +601,11 @@ export default {
this.outCaigouDetail = res; 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.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;
}, },
created() {
this.getPlanTypes();
}
}; };
</script> </script>

@ -163,15 +163,23 @@
<!-- 如果是 履约文件--> <!-- 如果是 履约文件-->
<template v-if="scope.row.assurance_status==1"> <template v-if="scope.row.assurance_status==1">
<!-- 那么必须财务审核通过--> <!-- 那么必须财务审核通过-->
<Button class="slot-btns-item" size="small" type="primary" <Button class="slot-btns-item"
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"> size="small"
type="primary"
@click="paying(scope.row)">
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记 付款登记
</Button> </Button>
</template> </template>
</template> </template>
<template v-else> <template v-else>
<Button class="slot-btns-item" size="small" type="primary" <Button class="slot-btns-item"
@click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"> size="small"
type="primary"
@click="paying(scope.row)">
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
付款登记 付款登记
</Button> </Button>
</template> </template>
@ -228,7 +236,7 @@
</template> </template>
<template v-if="hasEdit&&scope.row.status === 2"> <template v-if="hasEdit&&scope.row.status === 2">
<Button class="slot-btns-item" size="small" type="primary" <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> </Button>
</template> </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` `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) { async askProcess(row) {
let res = await getOatoken() let res = await getOatoken()

Loading…
Cancel
Save