合同会签

master
lion 1 year ago
parent b0887c0f34
commit 3ac3f2fe4e

@ -56,16 +56,8 @@
<span style="color: red;font-weight: 600;padding-right: 4px;">*</span>合同服务时间
</div>
<div class="xy-table-item-content">
<el-date-picker
v-model="form.time"
style="width: 300px;"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="dateRangePick"
/>
<el-date-picker v-model="form.time" style="width: 300px;" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateRangePick" />
</div>
</div>
</template>
@ -84,7 +76,8 @@
<div class="xy-table-item-label" style="width: 200px">保函金额
</div>
<div class="xy-table-item-content xy-table-item-price">
<el-input-number v-model="form.assurance_money" :controls="false" :precision="2" placeholder="请输入保函金额" style="width: 300px;" />
<el-input-number v-model="form.assurance_money" :controls="false" :precision="2" placeholder="请输入保函金额"
style="width: 300px;" />
</div>
</div>
</template>
@ -93,7 +86,8 @@
<div class="xy-table-item-label" style="width: 200px">保函有效期
</div>
<div class="xy-table-item-content">
<el-date-picker v-model="form.assurance_expire" value-format="yyyy-MM-dd" placeholder="请输入保函有效期" style="width: 300px;" />
<el-date-picker v-model="form.assurance_expire" value-format="yyyy-MM-dd" placeholder="请输入保函有效期"
style="width: 300px;" />
</div>
</div>
</template>
@ -104,13 +98,8 @@
<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
v-model="form.guaranteeMoney"
:precision="2"
:controls="false"
placeholder="请填写质保金"
style="width: 300px;"
/>
<el-input-number v-model="form.guaranteeMoney" :precision="2" :controls="false" placeholder="请填写质保金"
style="width: 300px;" />
</div>
</div>
</template>
@ -120,7 +109,8 @@
是否为延续类项目
</div>
<div class="xy-table-item-content">
<el-switch v-model="form.has_continue" active-text="" inactive-text="" :active-value="1" :inactive-value="0" />
<el-switch v-model="form.has_continue" active-text="" inactive-text="" :active-value="1"
:inactive-value="0" />
</div>
</div>
</template>
@ -142,12 +132,8 @@
<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
v-model="form.guaranteeYear"
:controls="false"
placeholder="请填写质保期"
style="width: 300px;"
/>
<el-input-number v-model="form.guaranteeYear" :controls="false" placeholder="请填写质保期"
style="width: 300px;" />
</div>
</div>
</template>
@ -158,27 +144,15 @@
<Button type="primary" style="margin-left: 20px;" @click="isShowAddManyPlan = true">批量添加</Button>
</div>
<xy-table
:list="signList"
:table-item="signTable"
:show-index="false"
:height="240"
<xy-table :list="signList" :table-item="signTable" :show-index="false" :height="240"
@delete="deleteContractSign"
@editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}"
/>
@editor="(row)=>{$refs['detailContractSign'].planId = row.id;$refs['detailContractSign'].isShow = true}" />
</template>
</xy-dialog>
<!-- 新增计划-->
<xy-dialog
:is-show.sync="isShowAddPlan"
type="form"
title="新增计划"
:form="planForm"
:rules="planRules"
:width="48"
@submit="submit"
>
<xy-dialog :is-show.sync="isShowAddPlan" type="form" title="新增计划" :form="planForm" :rules="planRules" :width="48"
@submit="submit">
<template v-slot:date>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -224,11 +198,7 @@
</template>
</xy-dialog>
<Modal
v-model="isShowAddManyPlan"
title="计划任务"
@on-ok="manyCreate"
>
<Modal v-model="isShowAddManyPlan" title="计划任务" @on-ok="manyCreate">
<div class="many-plan">
<div class="many-plan-item">
@ -238,17 +208,20 @@
<div class="many-plan-item">
<p>开始日期</p>
<el-date-picker v-model="manySetting.startMonth" size="mini" value-format="yyyy-MM-dd" @change="planMonthLists" />
<el-date-picker v-model="manySetting.startMonth" size="mini" value-format="yyyy-MM-dd"
@change="planMonthLists" />
</div>
<div class="many-plan-item">
<p>付款月份数</p>
<el-input-number v-model="manySetting.lastMonth" :controls="false" size="mini" :precision="0" :min="1" :max="12" @change="planMonthLists" />
<el-input-number v-model="manySetting.lastMonth" :controls="false" size="mini" :precision="0" :min="1"
:max="12" @change="planMonthLists" />
</div>
<div class="many-plan-item">
<p>付款日期</p>
<el-input-number v-model="manySetting.day" :controls="false" size="mini" :precision="0" :min="1" :max="31" @change="planMonthLists" />
<el-input-number v-model="manySetting.day" :controls="false" size="mini" :precision="0" :min="1" :max="31"
@change="planMonthLists" />
</div>
<div class="many-plan-item">
@ -269,31 +242,33 @@
</template>
<script>
import { MessageBox } from 'element-ui'
import {
import {
MessageBox
} from 'element-ui'
import {
addContractSign,
getContractSign,
delContractSign,
httpCurl
} from '@/api/contractSign/contractSign'
import {
} from '@/api/contractSign/contractSign'
import {
detailContract,
editorContract
} from '@/api/contract/contract'
import {
} from '@/api/contract/contract'
import {
Message
} from 'element-ui'
import {
} from 'element-ui'
import {
parseTime,
moneyFormatter
} from '@/utils'
} from '@/utils'
import detailContractSign from '@/views/contract/components/detailContractSign'
import {
import detailContractSign from '@/views/contract/components/detailContractSign'
import {
getOatoken
} from '@/api/oatoken'
import axios from 'axios'
export default {
} from '@/api/oatoken'
import axios from 'axios'
export default {
components: {
detailContractSign
},
@ -306,14 +281,18 @@ export default {
startMonth: ''
},
manyForm: [],
manyTable: [
{
manyTable: [{
prop: 'date',
label: '付款日期',
width: 160,
customFn: row => {
return (
<el-date-picker style='width: 130px;' vModel={row.date} size='mini' value-format='yyyy-MM-dd'></el-date-picker>
return ( <
el - date - picker style = 'width: 130px;'
vModel = {
row.date
}
size = 'mini'
value - format = 'yyyy-MM-dd' > < /el-date-picker>
)
}
},
@ -322,23 +301,36 @@ export default {
label: '金额',
width: 180,
customFn: row => {
return (
<el-input-number size='mini' vModel={row.money} precision={2} controls={false}></el-input-number>
return ( <
el - input - number size = 'mini'
vModel = {
row.money
}
precision = {
2
}
controls = {
false
} > < /el-input-number>
)
}
},
{
prop: 'operate',
label: '操作',
customFn: (row, { $index }) => {
return (
<Button type='error'
size='small'
on={{
customFn: (row, {
$index
}) => {
return ( <
Button type = 'error'
size = 'small'
on = {
{
'click': _ => {
this.manyForm.splice($index, 1)
}
}}>移除</Button>
}
} > 移除 < /Button>
)
}
}
@ -359,15 +351,35 @@ export default {
assurance_expire: ''
},
rules: {
number: [{ required: true, message: '必填' }],
date: [{ required: true, message: '必填' }],
supply: [{ required: true, message: '必填' }],
carryDepartment: [{ required: true, message: '必填' }],
money: [
{ required: true, message: '必填' },
{ pattern: /^\d+(\.\d+)?$/, message: '必须为数字' }
number: [{
required: true,
message: '必填'
}],
date: [{
required: true,
message: '必填'
}],
supply: [{
required: true,
message: '必填'
}],
carryDepartment: [{
required: true,
message: '必填'
}],
money: [{
required: true,
message: '必填'
},
{
pattern: /^\d+(\.\d+)?$/,
message: '必须为数字'
}
],
time: [{ required: true, message: '必选' }],
time: [{
required: true,
message: '必选'
}],
guaranteeMoney: [],
guaranteeYear: []
},
@ -436,8 +448,7 @@ export default {
}
}
},
computed: {
},
computed: {},
watch: {
async contractId() {
await this.getContractSignList()
@ -460,13 +471,15 @@ export default {
//
sign() {
{/* if (this.signList.length == 0) {
{
/* if (this.signList.length == 0) {
Message({
type: 'error',
message: '该项目未设置付款计划,请设置付款计划后保存'
})
return false
} */}
} */
}
const signMoneyTotal = this.signList.reduce((pre, cur) => (pre + Number(cur.money || 0)), 0)
if (signMoneyTotal !== Number(this.form.money)) {
@ -502,7 +515,23 @@ export default {
this.$emit('signSuccess')
})
},
//
handleOperationSuccess() {
// 1.
const message = {
type: 'operationCompleted', //
data: {
status: 'success',
result: '合同签署成功',
}
};
// 2.
//
// *
parent.postMessage(message, 'http://192.168.60.18:8001');
// http://192.168.60.99:8080
},
async getContractSignList() {
const res = await getContractSign({
contract_id: this.contractId,
@ -530,8 +559,14 @@ export default {
this.form.assurance_money = res.assurance_money
//
if (res.contract_type !== 160) {
this.rules.guaranteeMoney = [{ required: true, message: '必填' }]
this.rules.guaranteeYear = [{ required: true, message: '必填' }]
this.rules.guaranteeMoney = [{
required: true,
message: '必填'
}]
this.rules.guaranteeYear = [{
required: true,
message: '必填'
}]
} else {
this.rules.guaranteeMoney = []
this.rules.guaranteeYear = []
@ -598,7 +633,10 @@ export default {
const url =
`${process.env.VUE_APP_OUT_URL}/admin/flow/view/${this.contract.join_last_flow_id}`
// ?oatoken=${res.oatoken}&get_raw=1
const paras = { oatoken: resToken.oatoken, get_raw: 1 }
const paras = {
oatoken: resToken.oatoken,
get_raw: 1
}
const res = await httpCurl(paras, true, '/Api/flowDetail', 'GET', url)
console.log(res)
this.form.money = Number(res.flow['合同金额(元)'])
@ -646,7 +684,7 @@ export default {
}
}
}
}
}
</script>
<style scoped lang="scss">
@ -655,12 +693,14 @@ export default {
display: flex;
margin-bottom: 20px;
& > p {
&>p {
flex-basis: 30%;
flex-shrink: 0;
}
}
}
.base-info {
&-title {

@ -1569,6 +1569,12 @@ export default {
}
}).catch(error => {
})
// oa
if(this.$route.query.oaType==='contractSign'){
let contractId = this.$route.query.contractId
this.$refs['contractSign'].isShow = true
this.$refs['contractSign'].contractId = contractId
}
this.getPurchaseType()
this.getContracts()
this.getDepartment(-1)

Loading…
Cancel
Save