|
|
|
@ -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>
|
|
|
|
|
|
|
|
|
|
|
|
|