家里的样式

This commit is contained in:
zhangdingyu
2019-09-18 09:34:02 +08:00
commit 02d1678fff
681 changed files with 133918 additions and 0 deletions

View File

@@ -0,0 +1,791 @@
<template>
<div class="app-container">
<!--顶栏结构-->
<el-card>
<!--<el-radio v-model="radio" label="1">未收回</el-radio>-->
<!--<el-radio v-model="radio" label="2">已收回</el-radio>-->
<span>招标企业</span>
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:150px;margin: 3px" placeholder="请输入招标企业"/>
<span style="margin-left: 10px">保金类型</span>
<el-select v-model="TypeOfGoldDepositValue" clearable filterable placeholder="请选择" size="small" style="width: 150px">
<el-option
v-for="item in TypeOfGoldDeposit"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">投标人</span>
<el-input v-model="Bidder" clearable size="small" style="width:150px" placeholder="请选择" readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 1;searchPer()" @clear="clear()"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 30;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px;margin-right: 15px" @click="addBidBond();flag1 = 2">新增</el-button>
</el-card>
<!--投标保证金表格-->
<el-card>
<el-table
v-loading="tableData1Loading"
:data="tableData1"
style="width: 100%; margin-top: 3px"
height="770"
highlight-current-row=""
border
stripe
size="mini">
<el-table-column align="center" label="投标结果" width="200">
<template slot-scope="scope">
<el-radio-group v-model="scope.row.投标结果" @change="changeTenderResult(scope.row)">
<el-radio :disabled="scope.row.是否禁用已中标" label="1">已中标</el-radio>
<el-radio :disabled="scope.row.是否禁用未中标" label="2">未中标</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column align="center" label="公布日期" width="90">
<template slot-scope="scope">
{{ !scope.row.公布日期 ? '未公布' : scope.row.公布日期.substring(0 , scope.row.公布日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="招标企业" width="180">
<template slot-scope="scope">
{{ scope.row.招标企业 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="100">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="100">
<template slot-scope="scope">
{{ scope.row.联系电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="保证金金额" width="100">
<template slot-scope="scope">
<el-tag style="width: 80px" size="small">{{ scope.row.保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="中标服务费" width="100">
<template slot-scope="scope">
{{ scope.row.中标服务费 }}
</template>
</el-table-column>
<el-table-column align="center" label="转履约保证金金额" width="150">
<template slot-scope="scope">
{{ scope.row.转履约保证金金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="应收回金额" width="100">
<template slot-scope="scope">
{{ scope.row.应收回金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="实收回金额" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 2" size="small" type="success" style="width: 66px">{{ scope.row.应收回金额 }}</el-tag>
<el-tag v-else slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="投标人" width="100">
<template slot-scope="scope">
{{ scope.row.投标人 }}
</template>
</el-table-column>
<el-table-column align="center" label="保金类型" width="150">
<template slot-scope="scope">
{{ scope.row.保证金类型 }}
</template>
</el-table-column>
<el-table-column align="center" label="投标日期" width="150">
<template slot-scope="scope">
{{ scope.row.投标日期.substring(0, scope.row.投标日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="计划收回日期" width="150">
<template slot-scope="scope">
{{ !scope.row.预计收回日期 ? '结果未公布' : scope.row.预计收回日期.substring(0, scope.row.预计收回日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期" width="150">
<template slot-scope="scope">
{{ !scope.row.实际收回日期 ? '未收回' : scope.row.实际收回日期.substring(0, scope.row.实际收回日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.预计收回日期===''||scope.row.预计收回日期===null" slot="reference" size="small" style="width: 66px">未公布</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.是否收回)===2" slot="reference" type="success" size="small" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.状态) ===0" slot="reference" type="primary" size="small" style="width: 66px">未开始</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.状态) ===1" slot="reference" type="warning" size="small" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.状态) ===2" slot="reference" type="danger" size="small" style="width: 66px">已拖期</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-tooltip effect="dark" content="收回" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用"
size="mini"
type="text"
icon="el-icon-money"
@click.stop="TakeBack(scope.row);flag1 = 1"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="履约" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用履约"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-stopwatch"
@click.stop="ComplianceGold(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用编辑"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-edit-outline"
@click.stop="editBidBond(scope.row);flag1 = 3"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用删除"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-delete"
@click.stop="delBidBond(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-dialog :visible.sync="dialogFormVisiblePeople" title="人员信息" center width="750px">
<div style="height: 420px">
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
<el-tree
:data="dataPeople"
:default-expanded-keys="treeData"
node-key="id"
style="width: 150px;float: left"
height="400"
accordion
@node-click="handleNodeClick"
/>
</div>
<el-table :data="ListPeople" highlight-current-row height="400" size="mini" stripe style="width: 400px;float: left;margin-left: 30px" @row-click="handleChange" >
<el-table-column label="考勤编号" align="center" >
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column label="姓名" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="工作岗位" align="center">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
</div>
<el-button style="margin-left: 260px" @click="offName">取消</el-button>
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
</el-dialog>
<!--收回投标保证金-->
<el-dialog :visible.sync="dialogFormVisible1" title="收回投标保证金" center style="min-height: 300px" width="20%">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm">
<el-form-item label="实际收回日期" prop="收回日期">
<el-date-picker
v-model="form1.收回日期"
:picker-options="pickerOptions"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="收回日期"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form1')">取消</el-button>
<el-button type="primary" @click="submit('form1')"> </el-button>
</div>
</el-dialog>
<!--投标保证金对话框-->
<el-dialog :title="title" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="40%">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="招标企业" prop="招标企业">
<el-input v-model="form2.招标企业" size="small" placeholder="请输入招标企业" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" prop="联系人">
<el-input v-model="form2.联系人" size="small" placeholder="请输入联系人" style="width: 200px;"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="联系电话" prop="联系电话">
<el-input v-model="form2.联系电话" size="small" placeholder="请输入联系电话" style="width: 200px;"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保证金金额" prop="保证金金额">
<el-input-number v-model="form2.保证金金额" :precision="2" :step="1" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="保证金类型" prop="保证金类型">
<el-select v-model="form2.保证金类型" clearable filterable placeholder="请选择保证金类型" size="small" style="width: 200px;">
<el-option
v-for="item in TypeOfGoldDeposit1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="投标人" prop="投标人">
<el-input v-model="form2.投标人" size="small" placeholder="请输入投标人" style="width: 200px;" clearable readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 2;searchPer()" @clear="clear()"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="投标日期" prop="投标日期">
<el-date-picker
v-model="form2.投标日期"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="投标日期"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="公布后X天收回" prop="提前X天提醒我">
<el-input-number v-model="form2.提前X天提醒我" :step="1" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
<!--<el-col :span="12">-->
<!--<el-form-item label="计划收回日期" prop="计划收回日期">-->
<!--<el-date-picker-->
<!--v-model="form2.计划收回日期"-->
<!--style="width: 200px;"-->
<!--value-format="yyyy-MM-dd"-->
<!--size="small"-->
<!--type="date"-->
<!--placeholder="收回日期"/>-->
<!--</el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="备注">
<el-input v-model="form2.备注" size="small" placeholder="请输入备注" style="width: 560px;"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form2')">取消</el-button>
<el-button type="primary" @click="submit('form2')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogTimeVisible" :show-close="false" :close-on-click-modal="false" title="请输入" center style="min-height: 300px" width="23%">
<el-form ref="Timeform" :model="Timeform" :rules="TimeRules" label-width="150px">
<el-form-item label="投标结果公布日期" prop="投标结果公布日期">
<el-date-picker
v-model="Timeform.投标结果公布日期"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结果公布日期"/>
</el-form-item>
<el-form-item label="中标服务费" prop="中标服务费">
<el-input-number :disabled="tenderResultDisabled" v-model="Timeform.中标服务费" :precision="2" :step="1" :max="tenderResultMax" style="width: 200px" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffTime('Timeform')">取消</el-button>
<el-button type="primary" @click="submitTime('Timeform')"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogPerformanceBondVisible" title="转履约保证金" center style="min-height: 300px" width="40%">
<el-form ref="PerformanceBondform" :model="PerformanceBondform" :rules="PerformanceBondrules" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="项目名称" prop="项目名称">
<el-select v-model="PerformanceBondform.项目名称" filterable clearable placeholder="请选择项目名称" style="width: 560px" size="small">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="保证金金额" prop="保证金金额">
<el-input-number v-model="PerformanceBondform.保证金金额" :precision="2" :step="1" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保证金类型" prop="保证金类型">
<el-select v-model="PerformanceBondform.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">
<el-option
v-for="item in TypeOfGoldDeposit1"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="收回条件" prop="收回条件">
<el-select v-model="PerformanceBondform.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
<el-option
v-for="item in plannedTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="截止时间(天)" prop="截止时间">
<el-input-number v-model="PerformanceBondform.截止时间" placeholder="请输入截止时间" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffPerformanceBondform('PerformanceBondform')">取消</el-button>
<el-button type="primary" @click="submitPerformanceBondform('PerformanceBondform')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { initType, selectBidBond, getTree, tree, getTablePeople, TakeBack, addBidBond, editBidBond, delBidBond, winningBid, executionProgressID, intProject, submitPerformanceBond } from '@/api/MarketingCenter/BidBond'
export default {
components: {
elInput
},
data() {
return {
pickerOptions: {},
timetime: '',
treeData: [7],
entryName: [],
plannedTime: [],
disabled: false,
tenderResultDisabled: false,
dialogPerformanceBondVisible: false, // 转履约保证金对话框
BidBondCode: '',
MoneyTypeCode: '',
TypeOfGoldDeposit1: [],
flag2: '',
title: '',
dialogFormVisible2: false,
code: '',
flag1: '',
startTime: '',
startTime_check: '',
endTime: '',
endTime_check: '',
tableData1Loading: false,
TypeOfGoldDepositValue: '', // 保证金类型
TypeOfGoldDepositValue_check: '',
TypeOfGoldDeposit: [], // 保证金类型数组
Bidder: '', // 投标人,
Bidder_check: '',
TenderingEnterprise: '', // 招标企业
TenderingEnterprise_check: '',
time: [], // 时间区间
radio: '',
tableData1: [],
tenderResultMax: null,
PageSize: 30,
PageCurrent: 1,
total: null,
dataPeople: [],
dialogFormVisiblePeople: false,
ListPeople: [],
peopleid: '',
peoplename: '',
dialogFormVisible1: false,
dialogTimeVisible: false,
form1: {
收回日期: ''
},
Timeform: {
投标结果公布日期: '',
中标服务费: ''
},
PerformanceBondform: {
项目名称: '',
保证金类型: 1,
收回条件: 1,
截止时间: 15,
保证金金额: ''
},
form2: {
招标企业: '',
联系人: '',
联系电话: '',
保证金金额: '',
保证金类型: 1,
投标人: '',
投标日期: '',
计划收回日期: '',
提前X天提醒我: 15,
备注: ''
},
rules1: { // 表单验证规则
收回日期: [{ required: true, message: '请输入收回日期', trigger: 'change' }]
},
PerformanceBondrules: { // 表单验证规则
项目名称: [{ required: true, message: '请选择项目', trigger: 'change' }],
保证金类型: [{ required: true, message: '请选择保证金类型', trigger: 'change' }],
收回条件: [{ required: true, message: '请选择收回条件', trigger: 'change' }],
截止时间: [{ required: true, message: '请选择截止日期', trigger: 'change' }],
保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'change' }]
},
TimeRules: { // 表单验证规则
投标结果公布日期: [{ required: true, message: '请选择投标结果公布日期', trigger: 'change' }],
中标服务费: [{ required: true, message: '请输入中标服务费', trigger: 'change' }]
},
rules2: { // 表单验证规则
招标企业: [{ required: true, message: '请输入招标企业', trigger: 'blur' }],
联系人: [{ required: true, message: '请输入联系人', trigger: 'blur' }],
联系电话: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'blur' }],
保证金类型: [{ required: true, message: '请输入保证金类型', trigger: 'change' }],
投标人: [{ required: true, message: '请输入投标人', trigger: 'change' }],
投标日期: [{ required: true, message: '请选择收回日期', trigger: 'change' }],
计划收回日期: [{ required: true, message: '请选择计划收回日期', trigger: 'change' }],
提前X天提醒我: [{ required: true, message: '提前X天提醒我', trigger: 'blur' }]
}
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
changeTime() {
this.pickerOptions = Object.assign({}, this.pickerOptions, {
disabledDate: (time) => {
console.log(this.timetime)
return time.getTime() < Date.parse(this.timetime)
}
})
},
init() {
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'TypeOfGoldDeposit')
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'TypeOfGoldDeposit1')
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'plannedTime')
this.getSelect(intProject, ['项目名称', '项目流水号'], 'entryName')
getTree().then(response => { // 获取人员信息树
const data = response.data
this.dataPeople = tree(data, 0)
})
},
fetchTableData1() {
if (this.TypeOfGoldDepositValue === '' || this.TypeOfGoldDepositValue == null) {
this.TypeOfGoldDepositValue_check = 0
} else {
this.TypeOfGoldDepositValue_check = 1
}
if (this.Bidder === '' || this.Bidder == null) {
this.Bidder_check = 0
} else {
this.Bidder_check = 1
}
if (this.TenderingEnterprise === '' || this.TenderingEnterprise == null) {
this.TenderingEnterprise_check = 0
} else {
this.TenderingEnterprise_check = 1
}
if (this.startTime === '' || this.startTime == null) {
this.startTime_check = 0
} else {
this.startTime_check = 1
}
if (this.endTime === '' || this.endTime == null) {
this.endTime_check = 0
} else {
this.endTime_check = 1
}
this.tableData1Loading = true
selectBidBond(this.TypeOfGoldDepositValue_check, this.TypeOfGoldDepositValue, this.Bidder_check, this.peopleid, this.TenderingEnterprise_check, this.TenderingEnterprise, this.startTime_check, this.startTime, this.endTime_check, this.endTime, this.PageCurrent, this.PageSize).then(response => {
this.tableData1Loading = false
const data = response.data.rows
for (let i = 0; i < data.length; i++) {
data[i].公布日期 === '' || data[i].公布日期 === null || parseInt(data[i].履约金) === 1 || parseInt(data[i].投标结果) === 2 || parseInt(data[i].是否收回) === 2 ? data[i].是否禁用履约 = true : data[i].是否禁用履约 = false
parseInt(data[i].是否收回) === 2 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 2 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
data[i].公布日期 === '' || data[i].公布日期 === null || parseInt(data[i].是否收回) === 2 ? data[i].是否禁用 = true : data[i].是否禁用 = false
if (data[i].投标结果 === '1') {
data[i].是否禁用已中标 = false
data[i].是否禁用未中标 = true
} else if (data[i].投标结果 === '2') {
data[i].是否禁用已中标 = true
data[i].是否禁用未中标 = false
} else {
data[i].是否禁用已中标 = false
data[i].是否禁用未中标 = false
}
}
this.tableData1 = data
this.total = response.data.total
})
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
},
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
},
searchPer() {
this.getData(getTablePeople, 'ListPeople', 7)
},
handleNodeClick(data) { // 树节点点击
this.getData(getTablePeople, 'ListPeople', data.id)
},
handleChange(row) {
this.peopleid = row.人员编号
this.peoplename = row.姓名
},
getName() {
this.dialogFormVisiblePeople = false
if (this.flag2 === 1) {
this.Bidder = this.peoplename
} else {
this.form2.投标人 = this.peoplename
}
},
offName() {
this.dialogFormVisiblePeople = false
this.peopleid = ''
this.peoplename = ''
},
TakeBack(row) {
this.addForm('form1')
this.timetime = row.投标日期
this.changeTime()
this.dialogFormVisible1 = true
this.code = row.招标保证金流水号
},
submitTakeBack() {
TakeBack(this.code, this.form1.收回日期).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.fetchTableData1()
} else {
this.$message.error('信息更新失败')
}
})
},
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag1 === 1) {
this.submitTakeBack()
this.flag1 = null
} else if (this.flag1 === 2) {
this.addTableData1()
this.flag1 = null
} else if (this.flag1 === 3) {
this.editTableData1()
this.flag1 = null
}
}
})
},
callOff() {
this.dialogFormVisible1 = false
this.dialogFormVisible2 = false
},
ComplianceGold(row) {
this.addForm('PerformanceBondform')
this.code = row.招标保证金流水号
this.dialogPerformanceBondVisible = true
this.PerformanceBondform.保证金金额 = row.应收回金额
},
addBidBond() {
this.addForm('form2')
this.title = '新增投标保证金'
this.dialogFormVisible2 = true
},
addTableData1() {
addBidBond(this.form2.招标企业, this.form2.联系人, this.form2.联系电话, this.form2.保证金金额, this.peopleid, this.form2.保证金类型, this.form2.投标日期, this.form2.备注, this.form2.提前X天提醒我).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.title = ''
this.dialogFormVisible2 = false
this.fetchTableData1()
} else {
this.$message.error('添加失败,请检查金额于提醒天数是否为数字')
}
})
},
editBidBond(row) {
this.editForm(row, 'form2')
this.title = '编辑投标保证金'
this.dialogFormVisible2 = true
this.form2.招标企业 = row.招标企业
this.form2.联系人 = row.联系人
this.form2.联系电话 = row.联系电话
this.form2.保证金金额 = row.保证金金额
this.form2.投标人 = row.投标人
this.peopleid = row.人员流水号
this.form2.保证金类型 = parseInt(row.保证金类型流水号)
// this.MoneyTypeCode = row.保证金类型流水号
this.form2.投标日期 = row.投标日期
// this.form2.计划收回日期 = row.预计收回日期
this.form2.备注 = row.备注
this.form2.提前X天提醒我 = row.提前x天提醒
this.BidBondCode = row.招标保证金流水号
},
editTableData1() {
editBidBond(this.form2.招标企业, this.form2.联系人, this.form2.联系电话, this.form2.保证金金额, this.peopleid, this.form2.保证金类型, this.form2.投标日期, this.form2.备注, this.form2.提前X天提醒我, this.BidBondCode).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.title = ''
this.dialogFormVisible2 = false
this.fetchTableData1()
} else {
this.$message.error('编辑失败')
}
})
},
delBidBond(row) {
function a() {
this.fetchTableData1()
this.dialogFormVisible2 = false
}
this.deleteRow(delBidBond, row.招标保证金流水号, a)
},
changeTenderResult(row) {
this.code = row.招标保证金流水号
this.tenderResultMax = row.应收回金额
if (row.投标结果 === '1') {
this.radio = '1'
this.dialogTimeVisible = true
this.tenderResultDisabled = false
} else if (row.投标结果 === '2') {
this.radio = '2'
this.dialogTimeVisible = true
this.tenderResultDisabled = true
}
},
callOffTime() {
this.dialogTimeVisible = false
this.fetchTableData1()
},
submitTime() {
winningBid(this.code, this.radio, this.Timeform.投标结果公布日期, this.Timeform.中标服务费).then(response => {
if (response.data[0].result === '1') {
this.fetchTableData1()
this.dialogTimeVisible = false
this.$message.success('操作成功')
} else {
this.$message.error('操作失败')
}
})
},
callOffPerformanceBondform() {
this.dialogPerformanceBondVisible = false
},
submitPerformanceBondform(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
submitPerformanceBond(this.code, this.PerformanceBondform.项目名称, this.PerformanceBondform.保证金金额, this.PerformanceBondform.保证金类型, this.PerformanceBondform.收回条件, this.PerformanceBondform.截止时间).then(response => {
if (response.data[0].result === '1') {
this.fetchTableData1()
this.dialogPerformanceBondVisible = false
this.$message.success('操作成功')
} else {
this.$message.error('操作失败')
}
})
}
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,673 @@
<template>
<div class="app-container">
<el-card>
<span>客户名称</span>
<el-select v-model="CustomerNameValue" filterable placeholder="请输入客户名称" style="margin: 3px" size="small" clearable>
<el-option
v-for="item in CustomerName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<!--<el-input v-model="CustomerName" placeholder="请输入客户名称" size="small"></el-input>-->
<!--<span class="move">销售经理</span>-->
<!--<el-input clearable v-model="MarketingManagerValue" @dblclick.native="dialogFormVisiblePeople = true" size="small" style="width:200px" placeholder="请选择营销经理" clearable></el-input>-->
<!--<span class="move">信誉等级</span>-->
<!--<el-select v-model="CreditRatingValue" placeholder="请选择信誉等级" size="small">-->
<!--<el-option-->
<!--v-for="item in CreditRating"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value">-->
<!--</el-option>-->
<!--</el-select>-->
<el-button type="success" icon="el-icon-search" class="move" size="small" style="margin-left: 10px" @click="selectCustomerOfName">查询</el-button>
</el-card>
<el-card>
<el-button icon="el-icon-circle-plus-outline" size="small" style="margin-top: 3px" @click="addMarketingManager();flag = 1" >添加营销经理</el-button>
<el-table v-loading="loading3" :data="tableData3" highlight-current-row height="192" size="mini" stripe style="width: 100%;margin-top: 3px;margin-bottom: 0px" border>
<!--<el-table-column label="责权省份" align="center" min-width="80">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.省份 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="姓名" align="center">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
{{ scope.row.联系电话 }}
</template>
</el-table-column>
<el-table-column label="生日" align="center">
<template slot-scope="scope">
{{ scope.row.出生日期 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px" fixed="right">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
size="mini"
type="text"
class="el-icon-edit-outline"
@click="handleEditMarketingManager(scope.row);flag = 2"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
size="mini"
type="text"
style="margin-left: 20px"
class="el-icon-delete"
@click="handleDeleteMarketingManager(scope.$index, scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
<el-row>
<el-col :span="3">
<el-card>
<el-table
v-loading="loading1"
ref="multipleTable"
:data="tableData1"
stripe
highlight-current-row
tooltip-effect="dark"
style="width: 100%; margin-top: 3px;"
height="700"
size="mini"
border>
<el-table-column align="center" label="序号" width="65">
<template slot-scope="scope">
<el-radio :label="scope.row.省份流水号" v-model="radio" @change="pageCurrent = 1;pageSize = 30;getCurrentRow(scope.row.省份流水号, scope.row.省份)"/>
</template>
</el-table-column>
<el-table-column align="center" label="地区" width="auto">
<template slot-scope="scope">
{{ scope.row.省份 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="21">
<el-card>
<el-button icon="el-icon-circle-plus-outline" size="small" style="margin-top: 3px" @click = "addCustomer();flag1 = 1">新增客户</el-button>
<el-table v-loading="loading2" :data="tableData2" highlight-current-row height="640" size="mini" stripe style="width: 100%;margin-top: 2px" border>
<el-table-column label="客户名称" align="center" min-width="180" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="联系人" align="center" min-width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column label="开票电话" align="center" min-width="100">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column label="联系地址" align="center" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column label="电子邮箱" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.电子邮箱 }}
</template>
</el-table-column>
<el-table-column label="税号" align="center" min-width="120">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column label="开户行" align="center" min-width="140" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="银行账号" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
</template>
</el-table-column>
<el-table-column label="信誉等级" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.价值评估 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" min-width="100px" fixed="right">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
size="mini"
type="text"
class="el-icon-edit-outline"
@click="handleEdit(scope.row);flag1 = 2"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
size="mini"
type="text"
style="margin-left: 20px"
class="el-icon-delete"
@click="handleDelete(scope.$index, scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
v-if="!loading2"
:current-page="pageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
</el-col>
</el-row>
<el-dialog
:visible.sync="dialogVisible"
title="提示"
width="30%">
<span>该人员已经是销售经理了是否还要继续添加</span>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="addPer"> </el-button>
</span>
</el-dialog>
<!--选择人员-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="人员信息" center width="750px">
<div style="height: 420px">
<div style="float: left;margin-top: 10px;margin-left: 20px;overflow-y: scroll;height: 400px">
<el-tree
:data="dataPeople"
:default-expanded-keys="treeData"
node-key="id"
style="width: 150px;float: left"
height="400"
accordion
@node-click="handleNodeClick"
/>
</div>
<el-table :data="ListPeople" height="400" stripe style="width: 400px;float: left;margin-left: 30px" size="mini" highlight-current-row @row-click="handleChange">
<el-table-column label="考勤编号" align="center" >
<template slot-scope="scope">
{{ scope.row.考勤编号 }}
</template>
</el-table-column>
<el-table-column label="姓名" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
<el-table-column label="工作岗位" align="center">
<template slot-scope="scope">
{{ scope.row.岗位名称 }}
</template>
</el-table-column>
</el-table>
</div>
<el-button style="margin-left: 260px" @click="offName">取消</el-button>
<el-button type="primary" style="margin-top: 20px" @click="getName">确认</el-button>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center width="400px">
<el-form ref="form1" :model="form1" :rules="rules1" label-position="left" label-width="110px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="营销经理" prop="营销经理">
<el-input v-model="form1.营销经理" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="dialogFormVisiblePeople = true;searchPer()"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff1()">取消</el-button>
<el-button type="primary" @click="submit1('form1')"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title2" :visible.sync="dialogFormVisible2" center width="700px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-row>
<el-col :span="12">
<el-form-item label="省份:" prop="省份">
<el-input v-model="form2.省份" :disabled="true" clearable size="small" style="width:200px" placeholder="请选择省份"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="客户名称:" prop="客户名称">
<el-input v-model="form2.客户名称" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人:" prop="联系人">
<el-input v-model="form2.联系人" clearable size="small" style="width:200px" placeholder="请输入联系人"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
<el-form-item label="联系电话:" prop="联系电话">
<el-input v-model="form2.联系电话" clearable size="small" style="width:200px" placeholder="请输入联系电话"/>
</el-form-item>
</el-form>
</el-col>
<el-col :span="12">
<el-form-item label="开票电话:" prop="传真">
<el-input v-model="form2.传真" clearable size="small" style="width:200px" placeholder="请输入开票电话"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系地址:" prop="联系地址">
<el-input v-model="form2.联系地址" clearable size="small" style="width:200px" placeholder="请输入联系地址"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="电子邮箱:" prop="电子邮箱">
<el-input v-model="form2.电子邮箱" clearable size="small" style="width:200px" placeholder="请输入电子邮箱"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="税号:" prop="税号">
<el-input v-model="form2.税号" clearable size="small" style="width:200px" placeholder="请输入税号"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行账号:" prop="银行账号">
<el-input v-model="form2.银行账号" clearable size="small" style="width:200px" placeholder="请输入银行账号"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="信用等级:" prop="信用等级">
<el-select v-model="form2.信用等级" placeholder="请选择信誉等级" size="small">
<el-option
v-for="item in CreditRating"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行:" prop="开户行">
<el-input v-model="form2.开户行" clearable size="small" style="width:200px" placeholder="请输入开户行"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注:" prop="备注">
<el-input v-model="form2.备注" clearable size="small" style="width:200px" placeholder="请输入备注"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2()">取消</el-button>
<el-button type="primary" @click="submit2('form2')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { searchValue, selectAdress, selectCustomer, getTree, tree, getTablePeople, selectMarketingManager, selectCustomerOfName, initCustomer, deleteCustomer, deleteMarketingManager, addMarketingManager, editMarketingManager, addCustomer, selectAdressOfID, editCustomer, addPer } from '@/api/MarketingCenter/CRM'
export default {
components: {
elInput
},
data() {
return {
dialogVisible: false,
treeData: [7],
a: '', // 营销经理地区流水号
b: '', // 省份
c: '', // 客户流水号
flag: null,
flag1: null,
title1: '', // 营销经理对话框
title2: '', // 客户对话框
dialogFormVisible1: false, // 营销经理对话框可见性
dialogFormVisible2: false, // 客户对话框可见性
CustomerNameValue: '',
CustomerName: [], // 客户名称
// CreditRatingValue: '', // 信誉等级
CreditRating: [], // 信誉等级数组
tableData1: [], // 地区表
loading1: false, // 地区的加载动画
loading2: false, // 客户的加载动画
radio: null, // 地区选择框
tableData2: [], // 客户表
pageCurrent: 1,
pageSize: 30,
total: null,
AdressID: null, // 地区流水号
MarketingManagerValue: '', // 营销经理
dialogFormVisiblePeople: false,
dataPeople: [],
ListPeople: [],
peoplename: '',
peopleid: '',
tableData3: [],
loading3: false,
form1: {
营销经理: '' // 营销经理
},
form2: {
省份: '',
客户名称: '',
联系人: '',
联系电话: '',
传真: '',
联系地址: '',
电子邮箱: '',
税号: '',
银行账号: '',
信用等级: 1,
备注: '',
开户行: ''
},
rules1: { // 表单验证规则
营销经理: [{ required: true, message: '请选择营销经理', trigger: 'change' }]
},
rules2: { // 表单验证规则
省份: [{ required: true, message: '请选择省份' }],
客户名称: [{ required: true, message: '请输入客户名称' }],
联系人: [{ required: true, message: '请输入联系人' }],
信用等级: [{ required: true, message: '请选择信用等级' }]
}
}
},
created() {
this.init()
},
methods: {
init() {
this.loading1 = true
selectAdress().then(response => {
this.tableData1 = response.data
this.loading1 = false
})
this.getSelect(searchValue, ['价值评估', '价值评估流水号'], 'CreditRating')
getTree().then(response => { // 获取人员信息树
const data = response.data
this.dataPeople = tree(data, 0)
})
this.getSelect(initCustomer, ['客户名称', '客户流水号'], 'CustomerName')
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
},
getCurrentRow(row) {
this.CustomerNameValue = ''
this.AdressID = row
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
this.loading3 = true
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
},
handleSizeChange(val) {
this.pageCurrent = 1
this.pageSize = val
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
},
handleCurrentChange(val) {
this.pageCurrent = val
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
},
searchPer() {
this.getData(getTablePeople, 'ListPeople', 7)
},
handleNodeClick(data) { // 树节点点击
this.getData(getTablePeople, 'ListPeople', data.id)
},
offName() {
this.dialogFormVisiblePeople = false
this.peopleid = ''
this.peoplename = ''
},
getName() {
this.dialogFormVisiblePeople = false
this.form1.营销经理 = this.peoplename
},
handleChange(row) {
this.peopleid = row.人员编号
this.peoplename = row.姓名
},
selectCustomerOfName() {
selectCustomerOfName(this.CustomerNameValue, this.pageCurrent, this.pageSize).then(response => {
this.radio = parseInt(response.data.rows[0].客户名称省份流水号)
this.AdressID = parseInt(response.data.rows[0].客户名称省份流水号)
this.tableData2 = response.data.rows
return this.AdressID
}).then(data => {
this.loading3 = false
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
})
},
handleDelete(index, row) {
function a() {
if (this.CustomerNameValue === '') {
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
// this.loading3 = true
// selectMarketingManager(this.AdressID).then(response => {
// this.loading3 = false
// this.tableData3 = response.data
// })
}
if (this.CustomerNameValue !== '') {
selectCustomerOfName(row.客户流水号, this.pageCurrent, this.pageSize).then(response => {
// this.radio = parseInt(response.data.rows[0].客户名称省份流水号)
// this.AdressID = parseInt(response.data.rows[0].客户名称省份流水号)
this.tableData2 = response.data.rows
// return this.AdressID
})
}
}
this.deleteRow(deleteCustomer, row.客户流水号, a)
},
handleDeleteMarketingManager(index, row) {
function a() {
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
}
this.deleteRow(deleteMarketingManager, row.营销经理地区流水号, a)
},
addMarketingManager() {
this.dialogFormVisible1 = true
this.title1 = '新增营销经理'
this.addForm('form1')
},
callOff1() {
this.dialogFormVisible1 = false
},
submit1() {
function a() {
this.dialogFormVisible1 = false
this.loading3 = true
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
}
if (this.flag === 1) {
addMarketingManager(this.peopleid, 1).then(response => {
console.log(response)
if (response.data.hasOwnProperty('output') === false) {
if (response[0].result === '0') {
this.$notify.error(`增加失败`)
}
} else {
console.log(response)
if (response.data.result[0].result === '0') {
this.$notify.error(`增加失败`)
}
if (response.data.result[0].result === '1' && response.data.output[0].导入类型 === '1') {
this.dialogFormVisible1 = false
this.$notify.success('增加成功')
this.loading3 = true
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
}
if (response.data.output[0].导入类型 === '2') {
this.dialogVisible = true
}
}
})
// this.addTable(addMarketingManager, [this.peopleid, 1], 'form1', a)
} else {
this.editTable(editMarketingManager, [this.peopleid, this.a], 'form1', a)
}
},
addPer() {
addPer(this.peopleid, 1).then(response => {
if (response.data[0].result === '0') {
this.$notify.error(`增加失败`)
} else {
this.dialogFormVisible1 = false
this.dialogVisible = false
this.$notify.success('增加成功')
this.loading3 = true
selectMarketingManager(1).then(response => {
this.loading3 = false
for (let i = 0; i < response.data.length; i++) {
response.data[i].出生日期 = (response.data[i].出生日期).split(' ')[0]
}
this.tableData3 = response.data
})
}
})
},
handleEditMarketingManager(row) {
this.dialogFormVisible1 = true
this.title1 = '编辑营销经理'
this.form1.营销经理 = row.姓名
this.peopleid = row.营销经理流水号
this.a = row.营销经理地区流水号
},
addCustomer() {
this.addForm('form2')
if (this.AdressID === '' || this.AdressID === null) {
this.$message.warning('请选择一个省份')
} else {
this.dialogFormVisible2 = true
this.title2 = '新增客户'
}
selectAdressOfID(this.AdressID).then(response => {
this.form2.省份 = response.data[0].省份
})
},
callOff2() {
this.dialogFormVisible2 = false
},
handleEdit(row) {
this.dialogFormVisible2 = true
this.title2 = '编辑客户'
this.form2.省份 = row.省份
this.form2.客户名称 = row.客户名称
this.form2.联系电话 = row.电话
this.form2.传真 = row.传真
this.form2.联系地址 = row.地址
this.form2.联系人 = row.联系人
this.form2.电子邮箱 = row.电子邮箱
this.form2.银行账号 = row.银行账号
this.form2.税号 = row.税号
this.form2.信用等级 = parseInt(row.价值评估流水号)
this.form2.备注 = row.备注
this.c = row.客户流水号
this.form2.开户行 = row.开户行
},
submit2() {
function a() {
this.dialogFormVisible2 = false
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
}
if (this.flag1 === 1) {
this.addTable(addCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.form2.开户行], 'form2', a)
} else {
this.editTable(editCustomer, [this.AdressID, this.form2.客户名称, this.form2.联系电话, this.form2.传真, this.form2.联系地址, this.form2.联系人, this.form2.电子邮箱, this.form2.银行账号, this.form2.税号, this.form2.信用等级, this.form2.备注, this.c, this.form2.开户行], 'form2', a)
}
}
}
}
</script>
<style scoped>
.el-input{
width: 200px;
}
.el-select{
width: 200px;
}
.move{
margin-left: 10px;
}
.el-table td, .el-table th.is-leaf,
.el-radio__inner,
.el-input__inner{
border: 1px solid black!important;
}
</style>

View File

@@ -0,0 +1,951 @@
<template>
<div>
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" style="margin: 3px" size="small">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">机床型号</span>
<el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>
<span style="margin-left: 10px">销售经理</span>
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="openName()" @clear="clear()"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 30;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
highlight-current-row
style="width: 100%; margin-top: 3px"
height="600"
border
stripe
size="mini"
@row-click="fetchTableData"
@expand-change="selectMachine">
<el-table-column type="expand" label="详情">
<template slot-scope="scope">
<el-table :data="tableData2" border stripe style="width: 400px; text-align: center" size="mini">
<el-table-column label="设备型号" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="合同编号" width="130">
<template slot-scope="scope">
<template>
<el-tag slot="reference" type="small">{{ scope.row.合同编号 }}</el-tag>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="付款方式" width="80">
<template slot-scope="scope">
{{ scope.row.付款方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="110">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="图纸会签节点" width="110">
<template slot-scope="scope">
{{ scope.row.图纸会签节点 }}
</template>
</el-table-column>
<el-table-column align="center" label="设备预验收节点" width="110">
<template slot-scope="scope">
{{ scope.row.设备预验收节点 }}
</template>
</el-table-column>
<el-table-column align="center" label="发货节点" width="110">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
</template>
</el-table-column>
<el-table-column align="center" label="安装调试节点" width="110">
<template slot-scope="scope">
{{ scope.row.安装调试节点 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="90">
<template slot-scope="scope">
{{ scope.row.营销经理 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称" width="230" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" width="auto">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--营销经理选择-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="30%">
<span>责权省份: </span>
<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" size="small" @change="changeProvince">
<el-option
v-for="item in Province"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<div style="margin-top: 5px">
<el-table :data="tableData3" border stripe style="width: 100%; text-align: center;" size="mini" highlight-current-row @row-click="handleChange">
<el-table-column label="营销经理" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="offName">取消</el-button>
<el-button type="primary" @click="getName">确认</el-button>
</div>
</el-dialog>
<el-card class="box-card">
<div class="block" style="border: 1px solid rgb(220, 223, 230)">
<el-carousel :autoplay="true" trigger="click" height="100px">
<el-carousel-item>
<el-button type="text" style="margin: 3px;padding: 0px;" @click="goToContractCapitalManagement">收款情况</el-button>
<el-table
v-loading="listLoadingContractCapitalManagement"
:data="tableDataContractCapitalManagement"
style="width: 99%;"
height="100"
border
stripe
size="mini">
<el-table-column align="center" label="付款方式" width="100">
<template slot-scope="scope">
{{ scope.row.付款方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总金额(万元)" width="150">
<template slot-scope="scope">
{{ scope.row.合同总金额.toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="已到账金额(万元)" width="150">
<template slot-scope="scope">
{{ scope.row.已支付.toFixed(2) }}
</template>
</el-table-column>
<el-table-column align="center" label="未到账金额(万元)" width="150">
<template slot-scope="scope">
<el-tag size="small" style="width: 100px" type="warning">{{ scope.row.未支付金额.toFixed(2) }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="付款进度" width="150">
<template slot-scope="scope">
<div style="width: 130px">
<el-progress :text-inside="true" :stroke-width="18" :percentage="parseFloat(scope.row.付款百分比)" status="success" />
</div>
</template>
</el-table-column>
<el-table-column align="center" label="营销经理" width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称" width="260">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="80">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="130">
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="银行账号" width="200">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
</template>
</el-table-column>
<el-table-column align="center" label="税号">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
</el-table>
</el-carousel-item>
<el-carousel-item>
<el-button type="text" style="margin: 3px;padding: 0px;" @click="goToInvoiceRecord">开票情况</el-button>
<el-table
v-loading="listLoadingInvoiceRecord"
:data="tableDataInvoiceRecord"
style="width: 99%"
height="100"
border
stripe
size="mini">
<el-table-column
align="center"
label="序号"
type="index"
width="50"/>
<el-table-column align="center" label="发票抬头" width="200">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="纳税人识别号" width="180">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票电话" width="120">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票地址" width="200">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" width="120">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column align="center" label="银行账号" width="160">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额(含税)" width="150">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" width="150">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-carousel-item>
<el-carousel-item>
<el-button type="text" style="margin: 3px;padding: 0px;" @click="goToInvoiceDeliveryManagement">发货情况</el-button>
<el-table
v-loading="tableDataLoadingDeliveryManagement"
id="tb"
:data="tableDataDeliveryManagement"
highlight-current-row
style="width: 99%"
height="100"
border
stripe
size="mini"
>
<el-table-column align="center" label="发货单号">
<template slot-scope="scope">
{{ scope.row.发货单号 }}
</template>
</el-table-column>
<el-table-column align="center" label="收货地址" width="230">
<template slot-scope="scope">
{{ scope.row.省份 + scope.row.市名 + scope.row.详细地址 }}
</template>
</el-table-column>
<el-table-column align="center" label="收货人">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话">
<template slot-scope="scope">
{{ scope.row.联系方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="车辆牌号">
<template slot-scope="scope">
{{ scope.row.车辆牌号 }}
</template>
</el-table-column>
<el-table-column align="center" label="发货日期">
<template slot-scope="scope">
{{ scope.row.发货日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="运输状态">
<template slot-scope="scope">
{{ scope.row.运输状态 }}
</template>
</el-table-column>
<el-table-column align="center" label="运费">
<template slot-scope="scope">
{{ scope.row.运费 }}
</template>
</el-table-column>
<el-table-column align="center" label="签收人">
<template slot-scope="scope">
{{ scope.row.签收人 === '' || scope.row.签收人 === null ? '未签收' : scope.row.签收人 }}
</template>
</el-table-column>
</el-table>
</el-carousel-item>
<el-carousel-item>
<el-button type="text" style="margin: 3px;padding: 0px;" @click="goToBidBond">投标保证金</el-button>
<el-table
v-loading="tableData1LoadingBidBond"
:data="tableDataBidBond"
style="width: 99%"
height="100"
border
stripe
size="mini">
<el-table-column align="center" label="投标结果" width="190">
<template slot-scope="scope">
<el-radio-group v-model="scope.row.投标结果">
<el-radio :disabled="scope.row.是否禁用已中标" label="1">已中标</el-radio>
<el-radio :disabled="scope.row.是否禁用未中标" label="2">未中标</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column align="center" label="公布日期" width="100">
<template slot-scope="scope">
{{ !scope.row.公布日期 ? '未公布' : scope.row.公布日期.substring(0 , scope.row.公布日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="招标企业" width="180">
<template slot-scope="scope">
{{ scope.row.招标企业 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="100">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="120">
<template slot-scope="scope">
{{ scope.row.联系电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="保证金金额" width="100">
<template slot-scope="scope">
<el-tag style="width: 80px" size="small">{{ scope.row.保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="中标服务费" width="100">
<template slot-scope="scope">
{{ scope.row.中标服务费 }}
</template>
</el-table-column>
<el-table-column align="center" label="转履约保证金金额" width="150">
<template slot-scope="scope">
{{ scope.row.转履约保证金金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="应收回金额" width="100">
<template slot-scope="scope">
{{ scope.row.应收回金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="实收回金额" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 2" size="small" type="success" style="width: 66px">{{ scope.row.应收回金额 }}</el-tag>
<el-tag v-else slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="投标人" width="100">
<template slot-scope="scope">
{{ scope.row.投标人 }}
</template>
</el-table-column>
<el-table-column align="center" label="保金类型" width="150">
<template slot-scope="scope">
{{ scope.row.保证金类型 }}
</template>
</el-table-column>
<el-table-column align="center" label="投标日期" width="150">
<template slot-scope="scope">
{{ scope.row.投标日期.substring(0, scope.row.投标日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="计划收回日期" width="150">
<template slot-scope="scope">
{{ !scope.row.预计收回日期 ? '结果未公布' : scope.row.预计收回日期.substring(0, scope.row.预计收回日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期" width="150">
<template slot-scope="scope">
{{ !scope.row.实际收回日期 ? '未收回' : scope.row.实际收回日期.substring(0, scope.row.实际收回日期.length - 8) }}
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.预计收回日期===''||scope.row.预计收回日期===null" slot="reference" size="small" style="width: 66px">未公布</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.是否收回)===2" slot="reference" type="success" size="small" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.状态) ===0" slot="reference" type="primary" size="small" style="width: 66px">未开始</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.状态) ===1" slot="reference" type="warning" size="small" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&&scope.row.预计收回日期!==null&&parseInt(scope.row.状态) ===2" slot="reference" type="danger" size="small" style="width: 66px">已拖期</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-carousel-item>
<el-carousel-item>
<el-button type="text" style="margin: 3px;padding: 0px;" @click="goToPerformanceBond">履约保证金</el-button>
<el-table
v-loading="listLoadingPerformanceBond"
v-show="showPerformanceBond"
:data="tableDataPerformanceBond"
style="width: 99%"
height="100"
border
stripe
size="mini">
<el-table-column align="center" label="履约保证金金额">
<template slot-scope="scope">
<el-tag type="primary" size="small">{{ scope.row.履约保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="保证金类型">
<template slot-scope="scope">
{{ scope.row.保证金类型 }}
</template>
</el-table-column>
<el-table-column align="center" label="收回条件">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="截止时间">
<template slot-scope="scope">
{{ scope.row.提前X天提醒我 }}天内收回
</template>
</el-table-column>
<el-table-column align="center" label="是否收回">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 1" slot="reference" size="small" type="success" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="parseInt(scope.row.是否收回) === 0" slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? scope.row.实际收回日期 = '暂未收回' : scope.row.实际收回日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="状态">
<template slot-scope="scope">
<el-popover
placement="top-start"
title="收回计划"
width="200"
trigger="hover">
<div v-show="(scope.row.计划收款日期 === '' || scope.row.计划收款日期 === null) && parseInt(scope.row.是否收回)!== 1 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.计划收款日期 !== '' && scope.row.计划收款日期 !== null && parseInt(scope.row.是否收回)!== 1">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划收款日期 }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<div v-show="parseInt(scope.row.是否收回)=== 1 " style="text-align: center">
<h4>已于{{ scope.row.实际收回日期 }}收回</h4>
</div>
<el-tag v-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null && parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 1" slot="reference" size="small" type="warning" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 2" slot="reference" type="danger" size="small" style="width: 66px">已经拖期</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 0" slot="reference" type="primer" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 1" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.计划收款日期===''||scope.row.计划收款日期===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
</el-popover>
</template>
</el-table-column>
</el-table>
<div v-show="performanceGuaranteeShow" style="width: 300px;margin: 0 auto;">
<viewer>
<img :src="url" height="250px" style="margin: 0 auto;border: 1px solid black" alt="">
</viewer>
</div>
</el-carousel-item>
<el-carousel-item>
<el-button type="text" style="margin: 3px;padding: 0px;" @click="goToSafetyMargin">安全保证金</el-button>
<el-table
v-loading="listLoadingSafetyMargin"
:data="tableDataSafetyMargin"
style="width: 99%"
height="100"
border
stripe
size="mini">
<el-table-column align="center" label="保证金金额" width="100">
<template slot-scope="scope">
<el-tag type="primary" size="small">{{ scope.row.保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="交付日期" width="150">
<template slot-scope="scope">
{{ !!scope.row.交付日期 ? scope.row.交付日期.substring(0, scope.row.交付日期.length - 8) : scope.row.交付日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="收回条件" width="130">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="截止时间(天)" width="150">
<template slot-scope="scope">
{{ scope.row.提前x天提醒 }}天内收回
</template>
</el-table-column>
<el-table-column align="center" label="扣款金额" width="100">
<template slot-scope="scope">
{{ scope.row.扣款金额 }}
</template>
</el-table-column>
<el-table-column label="应收回金额" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.应收回金额 }}
</template>
</el-table-column>
<el-table-column label="实际收回金额" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? '0' : scope.row.应收回金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="是否收回" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 2" slot="reference" size="small" type="success" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="parseInt(scope.row.是否收回) === 1" slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期" width="130">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? '未收回' : scope.row.实际收回日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="100">
<template slot-scope="scope">
<el-popover
placement="top-start"
title="收回计划"
width="200"
trigger="hover">
<div v-show="(scope.row.预计收回日期 === '' || scope.row.预计收回日期 === null) && parseInt(scope.row.是否收回)!== 2 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.预计收回日期 !== '' && scope.row.预计收回日期 !== null && parseInt(scope.row.是否收回)!== 2">
<h4>{{ scope.row.执行进度名 }}{{ !scope.row.节点日期 ? scope.row.节点日期 : scope.row.节点日期.substring(0, scope.row.预计收回日期.length - 8) }}完成计划于{{ !scope.row.预计收回日期 ? scope.row.预计收回日期 : scope.row.预计收回日期.substring(0, scope.row.预计收回日期.length - 8) }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<div v-show="parseInt(scope.row.是否收回)=== 2 " style="text-align: center">
<h4>已于{{ !scope.row.实际收回日期 ? scope.row.实际收回日期 : scope.row.实际收回日期.substring(0, scope.row.实际收回日期.length - 8) }}收回</h4>
</div>
<el-tag v-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null && parseInt(scope.row.是否收回) === 1 && parseInt(scope.row.状态) === 1" slot="reference" size="small" type="warning" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null &&parseInt(scope.row.是否收回) === 1 && parseInt(scope.row.状态) === 2" slot="reference" type="danger" size="small" style="width: 66px">已经拖期</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null &&parseInt(scope.row.是否收回) === 1 && parseInt(scope.row.状态) === 0" slot="reference" type="primer" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null &&parseInt(scope.row.是否收回) === 2" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.预计收回日期===''||scope.row.预计收回日期===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
<div v-show="false">{{ scope.row.预计收回日期===''||scope.row.预计收回日期===null || parseInt(scope.row.是否收回) === 2 ? scope.row.是否禁用收回 = true : scope.row.是否禁用收回 = false }}</div>
</el-popover>
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-carousel-item>
</el-carousel>
</div>
</el-card>
</div>
</template>
<script>
import request from '@/utils/request'
import elInput from 'element-ui/packages/input'
import { readImg } from '@/utils/request'
import { initProject, selectProvince, SelectMarketingManager, searchTable1, selectMachine, searchTableDataInvoiceRecord, searchTableContractCapitalManagement, searchTableSafetyMargin, searchTableBidBond, typeOfPerformanceBond, searchTableDataPerformanceBond, searchTableDataDeliveryManagement } from '@/api/MarketingCenter/ComprehensiveInquiryMS'
export default {
components: {
elInput
},
data() {
return {
tableDataLoadingDeliveryManagement: false,
tableDataDeliveryManagement: [],
dialogVisible: false,
dialogImageUrl: '',
fileList: [],
performanceGuaranteeShow: false,
showPerformanceBond: false,
listLoadingPerformanceBond: false,
tableDataPerformanceBond: [],
tableDataContractCapitalManagement: [],
listLoadingContractCapitalManagement: false,
tableDataSafetyMargin: [],
listLoadingSafetyMargin: false,
tableData1LoadingBidBond: false,
tableDataBidBond: [],
entryNameValue: '',
entryName: [],
entryNameValue_check: null,
MarketingManagerValue: '',
peopleid_check: '',
startTime: '',
machine: '',
machine_check: '',
startTime_check: null,
endTime: '',
endTime_check: null,
param: '',
PageSize: 30,
PageCurrent: 1,
total: null,
dialogFormVisiblePeople: false,
Province: '',
ProvinceValue: '',
tableData3: [],
peopleid: '',
peoplename: '',
listLoading: false,
expands: [],
tableData1: [],
tableData2: [],
projectNum: '',
listLoadingInvoiceRecord: false,
tableDataInvoiceRecord: [],
a: 1,
b: 1,
url: ''
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
},
openName() {
this.dialogFormVisiblePeople = true
this.ProvinceValue = ''
this.tableData3 = []
},
changeProvince() {
SelectMarketingManager(this.ProvinceValue).then(response => {
this.tableData3 = response.data
})
},
offName() {
this.dialogFormVisiblePeople = false
this.peopleid = ''
this.c = ''
},
getName() {
this.dialogFormVisiblePeople = false
this.MarketingManagerValue = this.peoplename
},
handleChange(row) {
this.peopleid = row.营销经理流水号
this.peoplename = row.姓名
},
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.MarketingManagerValue === '' || this.MarketingManagerValue === null) { this.peopleid_check = 0 } else { this.peopleid_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
if (this.machine === '' || this.machine === null) { this.machine_check = 0 } else { this.machine_check = 1 }
this.listLoading = true
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.peopleid, this.entryNameValue_check, this.peopleid_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine], ['tableData1', 'total', 'listLoading'])
this.tableDataInvoiceRecord = []
this.tableDataContractCapitalManagement = []
this.tableDataSafetyMargin = []
},
getRowKeys(row) {
return row.项目流水号
},
selectMachine(row) {
if (this.a === 1) {
this.expands.push(row.项目流水号)
this.b = row.项目流水号
this.a = 0
} else {
if (this.b === row.项目流水号) {
this.expands = []
this.a = 1
} else {
this.expands = []
this.expands.push(row.项目流水号)
this.a = 0
this.b = row.项目流水号
}
}
selectMachine(row.项目流水号).then(response => {
this.tableData2 = response.data
})
this.projectNum = row.项目流水号
},
fetchTableData(row) {
this.projectNum = row.项目流水号
this.getFileList()
this.listLoadingInvoiceRecord = true
this.listLoadingContractCapitalManagement = true
this.listLoadingSafetyMargin = true
this.tableData1LoadingBidBond = true
this.listLoadingPerformanceBond = true
this.tableDataLoadingDeliveryManagement = true
searchTableDataInvoiceRecord(this.projectNum).then(response => {
this.listLoadingInvoiceRecord = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableDataInvoiceRecord = data
})
searchTableContractCapitalManagement(this.projectNum).then(response => {
this.listLoadingContractCapitalManagement = false
const data = response.data
for (let i = 0; i < data.length; i++) {
if (parseFloat(data[i].付款百分比) >= 99.9) {
data[i].付款百分比 = 100
}
}
this.tableDataContractCapitalManagement = data
})
searchTableSafetyMargin(this.projectNum).then(response => {
this.listLoadingSafetyMargin = false
this.tableDataSafetyMargin = response.data
})
searchTableBidBond(this.projectNum).then(response => {
this.tableData1LoadingBidBond = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].投标结果 = (data[i].投标结果).toString()
if (parseInt(data[i].投标结果) === 1) {
data[i].是否禁用已中标 = false
data[i].是否禁用未中标 = true
} else if (parseInt(data[i].投标结果) === 2) {
data[i].是否禁用已中标 = true
data[i].是否禁用未中标 = false
} else {
data[i].是否禁用已中标 = false
data[i].是否禁用未中标 = false
}
}
this.tableDataBidBond = data
})
typeOfPerformanceBond(this.projectNum).then(response => {
const data = response.data[0].履约保证金类型
return parseInt(data)
}).then(data => {
if (data === 1) {
this.performanceGuaranteeShow = false
this.showPerformanceBond = true
searchTableDataPerformanceBond(this.projectNum).then(response => {
this.listLoadingPerformanceBond = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
}
this.tableDataPerformanceBond = data
})
} else {
this.performanceGuaranteeShow = true
this.showPerformanceBond = false
}
})
searchTableDataDeliveryManagement(this.projectNum).then(response => {
this.tableDataLoadingDeliveryManagement = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].发货日期 = data[i].发货日期.substring(0, data[i].发货日期.length - 9)
data[i].运输状态 === 0 ? data[i].运输状态 = '运输中' : data[i].运输状态 = '已签收'
}
this.tableDataDeliveryManagement = data
})
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
this.tableDataInvoiceRecord = []
this.tableDataContractCapitalManagement = []
this.tableDataSafetyMargin = []
},
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
this.tableDataInvoiceRecord = []
this.tableDataContractCapitalManagement = []
this.tableDataSafetyMargin = []
},
goToInvoiceRecord() {
this.$router.push({ path: '/InvoiceRecord/index' })
},
goToContractCapitalManagement() {
this.$router.push({ path: '/ContractCapitalManagement/index' })
},
goToSafetyMargin() {
this.$router.push({ path: '/SafetyMargin/index' })
},
goToBidBond() {
this.$router.push({ path: '/BidBond/index' })
},
goToPerformanceBond() {
this.$router.push({ path: '/PerformanceBond/index' })
},
goToInvoiceDeliveryManagement() {
this.$router.push({ path: '/DeliveryManagement/index' })
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
async getFileList() {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 合同信息管理_履约保证金_履约保函 where 是否启用 = 1 and 项目流水号 = ${this.projectNum}`
}
})
this.url = readImg + data[0].文件标识
},
async handleRemove(file, fileList) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 合同信息管理_履约保证金_履约保函 set 是否启用 = 0 where 履约保函流水号 = ${file._id}`
}
})
if (data[0].result === '0') {
this.$message.error('上传失败')
}
},
beforeUpload(file) {
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
const isInvoiceNum = !!this.projectId
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
if (!isLt4M) {
this.$message.error('上传图片大小不能超过 4MB!')
}
return isJPG && isLt4M && isInvoiceNum
},
onSuccess(res, file, fileList) {
fileList = []
if (res[0].result === '1') {
this.getFileList()
} else {
this.$message.error('上传失败')
}
}
}
}
</script>
<style scoped>
.el-carousel__item h3 {
color: #475669;
font-size: 14px;
opacity: 0.75;
line-height: 150px;
margin: 0;
}
.el-carousel__item:nth-child(2n) {
background-color: white;
}
.el-carousel__item:nth-child(2n+1) {
background-color: white;
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,414 @@
<template>
<div>
<el-card>
<div>
<span>项目名称</span>
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" size="small" style="margin-top: 3px">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">机床型号</span>
<el-input v-model="machine" clearable size="small" style="width:200px" placeholder="请输入机床型号"/>
</div>
<div style="margin-top: 10px">
<span style="margin-left: 0px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 10;PageCurrent = 1;fetchTableData1()">查询</el-button>
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">增加</el-button>
</div>
</el-card>
<el-card>
<el-table
v-loading="listLoading"
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
style="width: 100%"
height="700"
border
stripe
size="mini"
@expand-change="selectMachine">
<el-table-column type="expand" label="详情">
<template slot-scope="scope">
<el-table :data="tableData2" border style="width: 612px; text-align: center" size="mini">
<el-table-column label="设备型号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="设备名称" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="100">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-edit"
@click="editMachine(scope.row);flag = 2">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="deleteMachine(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column align="center" label="合同编号" width="150">
<template slot-scope="scope">
<template>
<el-tag slot="reference">{{ scope.row.合同编号 }}</el-tag>
</template>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="150">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="项目下达日期" width="150">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" width="150">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="350">
<template slot-scope="scope">
<el-button
size="mini"
type="warning"
icon="el-icon-plus"
@click.stop="addMachine(scope.row);flag = 1">机床</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click.stop="handleEdit(scope.row)">编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click.stop="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--新增合同信息对话框-->
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="140px" class="demo-ruleForm">
<el-row>
<el-col :span="24">
<el-form-item label="项目名称" prop="EntryName">
<el-input v-model="form.EntryName" size="small" placeholder="请输入项目名称" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="项目下达日期" prop="contractSigningDate">
<el-date-picker
v-model="form.contractSigningDate"
style="width: 200px"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择项目下达日期"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
style="width: 200px"
type="textarea"
autosize
placeholder="请输入项目介绍"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit('form')"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="450px">
<el-form ref="form1" :model="form1" :rules="rules1" label-width="140px">
<el-form-item v-show="flag != 2" label="项目名称" prop="项目名称">
<el-input v-model="form1.项目名称" size="small" style="width:200px"/>
</el-form-item>
<el-form-item label="设备型号" prop="设备型号">
<el-input v-model="form1.设备型号" size="small" placeholder="请输入设备型号" style="width:200px"/>
</el-form-item>
<el-form-item label="设备名称" prop="设备名称">
<el-input v-model="form1.设备名称" size="small" placeholder="请输入设备名称" style="width:200px"/>
</el-form-item>
<el-form-item label="机床数量" prop="机床数量">
<el-input-number :min="1" v-model="form1.机床数量" controls-position="right" style="width:200px" size="small"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff2('form1')">取消</el-button>
<el-button type="primary" @click="submitMachine('form1')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { getNowTime } from '@/utils/tool'
import { initProject, searchTable1, selectMachine, addList, editchar, delList, submitMachine, editMachine, delMachine } from '@/api/MarketingCenter/CreateProject'
export default {
components: {
elInput
},
data() {
return {
entryName: [],
entryNameValue: '',
machine: '',
startTime: '',
endTime: '',
PageCurrent: 1,
PageSize: 10,
total: null,
listLoading: false,
entryNameValue_check: 0,
startTime_check: 0,
endTime_check: 0,
machine_check: 0,
a: 1,
b: 1,
c: 1,
tableData1: [],
expands: [],
tableData2: [],
projectNum: '',
hetongID: '',
form: {
EntryName: '', // 项目名称
contractSigningDate: '',
remark: ''
},
dialogFormVisible1: false,
title: '',
rules: { // 表单验证规则
EntryName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
contractSigningDate: [{ required: true, message: '请选择项目下达日期', trigger: 'change' }]
},
dialogFormVisible2: false,
title1: '',
form1: {
项目名称: '',
设备型号: '',
设备名称: '',
机床数量: 1
},
rules1: { // 表单验证规则
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
},
temp: '',
flag: ''
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
},
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
},
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
if (this.machine === '' || this.machine === null) { this.machine_check = 0 } else { this.machine_check = 1 }
this.listLoading = true
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime, this.machine_check, this.machine], ['tableData1', 'total', 'listLoading'])
},
selectMachine(row) {
this.projectNum = row.项目流水号
if (this.a === 1) {
this.expands.push(row.项目流水号)
this.b = row.项目流水号
this.a = 0
} else {
if (this.b === row.项目流水号) {
this.expands = []
this.a = 1
} else {
this.expands = []
this.expands.push(row.项目流水号)
this.a = 0
this.b = row.项目流水号
}
}
selectMachine(row.项目流水号).then(response => {
this.tableData2 = response.data
})
},
getRowKeys(row) {
return row.项目流水号
},
ADD() {
this.addForm('form')
this.dialogFormVisible1 = true
this.form.contractSigningDate = getNowTime()// new Date()
this.temp = 1
this.title = '新增项目'
},
// 提交添加或者修改
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.temp === 1) {
this.addTableData1()
this.temp = null
} else if (this.temp === 2) {
this.chaEdit()
this.temp = null
}
}
})
},
addTableData1() {
addList(this.form.EntryName, this.form.remark, this.form.contractSigningDate).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.title = ''
this.fetchTableData1()
} else {
this.$message.error('添加失败')
}
})
},
callOff() {
this.dialogFormVisible1 = false
this.dialogFormVisible2 = false
},
handleEdit(row) {
this.editForm(row, 'form')
this.title = '编辑项目'
this.dialogFormVisible1 = true
this.form.contractSigningDate = row.合同签订日期
this.form.contractNumber = row.合同编号
this.form.EntryName = row.项目名称
this.hetongID = row.项目流水号
this.form.remark = row.合同信息备注
this.temp = 2
},
chaEdit() {
editchar(this.form.EntryName, this.form.remark, this.hetongID, this.form.contractSigningDate).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.fetchTableData1()
} else {
this.$message.error('信息更新失败')
}
})
},
handleDelete(row) {
this.deleteRow(delList, row.项目流水号, function() { this.fetchTableData1() })
},
addMachine(row) {
this.projectNum = row.项目流水号
this.dialogFormVisible2 = true
this.title1 = '新增机床'
this.addForm('form1')
this.form1.项目名称 = row.项目名称
},
submitMachine() {
function a() {
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
})
this.dialogFormVisible2 = false
}
if (this.flag === 1) {
this.addTable(submitMachine, [this.projectNum, this.form1.设备型号, this.form1.设备名称, this.form1.机床数量], 'form1', a)
} else {
this.editTable(editMachine, [this.c, this.form1.设备型号, this.form1.设备名称, this.form1.机床数量], 'form1', a)
}
},
deleteMachine(row) {
function a() {
selectMachine(this.projectNum).then(response => {
this.tableData2 = response.data
})
}
this.deleteRow(delMachine, row.机床流水号, a)
},
editMachine(row) {
this.flag = 2
this.editForm(row, 'form1')
this.dialogFormVisible2 = true
this.title1 = '编辑机床'
this.c = row.机床流水号
this.form1.设备型号 = row.机床图号
this.form1.设备名称 = row.机床名称
},
callOff2() {
this.dialogFormVisible2 = false
}
}
}
</script>
<style scoped>
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,104 @@
<template>
<div style="display: inline-block;width: 100%;height: 100%;margin: 10px 20px 40px 10px">
<input id="excel-upload-input" ref="excel-upload-input" type="file" multiple="multiple" accept=".xlsx, .xls" class="c-hide" @change="handkeFileChange">
<el-button style="margin-left:16px;" size="small" icon="el-icon-search" type="success" @click="handleUpload">浏览清单</el-button>
<!--<div id="drop" @drop="handleDrop" @dragover="handleDragover" @dragenter="handleDragover">-->
<!--将Excel文件拖到这或-->
<!--<el-button style="margin-left:16px;" size="small" icon="el-icon-search" type="success" @click="handleUpload">浏览</el-button>-->
<!--</div>-->
</div>
</template>
<script>
import XLSX from 'xlsx'
export default {
data() {
return {
loading: false,
excelData: {
itemFile: [],
worksheet: []
}
}
},
methods: {
generateDate({ itemFile, worksheet }) {
this.excelData.itemFile.push(itemFile)
this.excelData.worksheet.push(worksheet)
},
handleDrop(e) {
this.excelData.itemFile = []
this.excelData.worksheet = [] // 每次拖拽都清空一次
e.stopPropagation()
e.preventDefault()
const files = e.dataTransfer.files
for (let i = 0; i < files.length; i++) { // 支持多个文件
const itemFile = files[i]
this.readerData(itemFile)
}
this.$emit('on-selected-file', this.excelData)
e.stopPropagation()
e.preventDefault()
},
handleDragover(e) {
e.stopPropagation()
e.preventDefault()
e.dataTransfer.dropEffect = 'copy'
},
handleUpload() {
this.excelData.itemFile = []
this.excelData.worksheet = [] // 每次点击“浏览”都清空一次
document.getElementById('excel-upload-input').click()
},
handkeFileChange(e) {
const files = e.target.files
for (let i = 0; i < files.length; i++) { // 支持多个文件
const itemFile = files[i]
if (!itemFile) return
this.readerData(itemFile)
}
this.$emit('on-selected-file', this.excelData)
this.$refs['excel-upload-input'].value = null // fix can't select the same excel
},
readerData(itemFile) {
const reader = new FileReader()
reader.onload = e => {
const data = e.target.result
const fixedData = this.fixdata(data)
const workbook = XLSX.read(btoa(fixedData), { type: 'base64' })
const firstSheetName = workbook.SheetNames[0] // cjnsheetname
const worksheet = workbook.Sheets[firstSheetName] // 默认firstsheet
this.generateDate({ itemFile, worksheet })
}
reader.readAsArrayBuffer(itemFile)
},
fixdata(data) {
let o = ''
let l = 0
const w = 10240
for (; l < data.byteLength / w; ++l) o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w, l * w + w)))
o += String.fromCharCode.apply(null, new Uint8Array(data.slice(l * w)))
return o
}
}
}
</script>
<style scoped>
#excel-upload-input{
display: none;
z-index: -9999;
}
#drop{
border: 2px dashed #bbb;
width: 600px;
line-height: 160px;
margin: 0;
font-size: 24px;
border-radius: 5px;
text-align: center;
color: #bbb;
position: relative;
}
</style>

View File

@@ -0,0 +1,19 @@
// 导出Excel方法表格id不加扩展名的文件名sheet名
export function exportExcelMethod(tableId, fileName, sheetName) {
tableToExcel(tableId, fileName, sheetName)
}
const tableToExcel = (function() {
const uri = 'data:application/vnd.ms-excel;base64,'
// 设置导出表格的单元格默认高度/宽度/边框样式/字体颜色/背景颜色/居中网页显示表格宽度建议1240tr/td视情况而定
const template = `<html xmlns:x="urn:schemas-microsoft-com:office:excel"><head><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><meta charset="UTF-8"><style type="text/css">table td {border: 1px solid #000000;width:100px;text-align: center;color: #000000;} th {border: 1px solid #000000;width:100px;text-align: center;color: #000000;}</style></head><body><table>{table}</table></body></html>`
const base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) }
const format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p] }) }
return function(table, filename, sheetname) {
if (!table.nodeType) table = document.getElementById(table)
const ctx = { worksheet: sheetname || 'Worksheet', table: table.innerHTML }
const aTag = document.createElement('a')
aTag.href = uri + base64(format(template, ctx))
aTag.download = filename
aTag.click()
}
})()

View File

@@ -0,0 +1,38 @@
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default {
install(Vue, options) {
Vue.prototype.getPdf = function() {
console.log(document)
var title = '12' // this.htmlTitle
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(function(canvas) {
const contentWidth = canvas.width
const contentHeight = canvas.height
const pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
const imgWidth = 595.28
const imgHeight = 592.28 / contentWidth * contentHeight
const pageData = canvas.toDataURL('image/jpeg', 1.0)
const PDF = new JsPDF('', 'pt', 'a4')
console.log(PDF, 99)
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + '.pdf')
}
)
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,708 @@
<template>
<div>
<!--查询条件-->
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" filterable placeholder="项目名称" style="margin: 3px" size="small" clearable>
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">营销经理</span>
<el-input v-model="MarketingManagerValue" readonly clearable size="small" style="width:200px" placeholder="请双击选择营销经理" @dblclick.native="openName" @clear="clearPeople()"/>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 30;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<!--项目表格-->
<el-card>
<el-table
v-loading="listLoading1"
:data="tableData1"
highlight-current-row
style="width: 100%;margin-top: 3px"
height="460"
border
stripe
size="mini"
@row-click="fetchTableData2">
<el-table-column align="center" label="合同编号" width="140">
<template slot-scope="scope">
<el-tag size="small" type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="付款方式" width="100">
<template slot-scope="scope">
{{ scope.row.付款方式 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="100">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="80">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同总金额(含税)" width="130">
<template slot-scope="scope">
<el-tag v-if="scope.row.合同总金额===''||scope.row.合同总金额===null" slot="reference" size="mini" style="width: 80px" type="warning">无收款计划</el-tag>
<el-tag v-else slot="reference" type="success" size="mini" style="width: 80px"> {{ scope.row.合同总金额 }} </el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="已到账金额" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.已支付===''||scope.row.已支付===null" slot="reference" size="mini" style="width: 80px" type="warning">无收款计划</el-tag>
<el-tag v-else slot="reference" type="success" size="mini" style="width: 80px"> {{ scope.row.已支付 }} </el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="税率" width="100">
<template slot-scope="scope">
<el-input :disabled="scope.row.是是否禁用税率编辑" v-model="scope.row.税率" class="tableInput" size="mini" style="width:70px" placeholder="请填写税率" @click.native="unlockEditor(scope.row)" @blur="lockEditor(scope.row)" @change="revisionOfTaxRate(scope.row)"/>
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="openAddInvoiceRecordingDialog(scope.row); flag = 1">新增记录</el-button>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
style="margin: 3px"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--开票记录-->
<el-card>
<el-table
v-loading="listLoading2"
:data="tableData2"
:summary-method="getSummaries"
show-summary
style="width: 100%;margin-top: 3px"
height="300"
highlight-current-row
border
stripe
size="mini">
<el-table-column
align="center"
label="序号"
type="index"
width="50"/>
<el-table-column align="center" label="发票抬头" width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="纳税人识别号" width="180">
<template slot-scope="scope">
{{ scope.row.税号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票电话" width="120">
<template slot-scope="scope">
{{ scope.row.传真 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票地址" width="200">
<template slot-scope="scope">
{{ scope.row.地址 }}
</template>
</el-table-column>
<el-table-column align="center" label="开户行" width="120">
<template slot-scope="scope">
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column align="center" label="银行账号" width="160">
<template slot-scope="scope">
{{ scope.row.银行账号 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票金额(含税)" width="120">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="开票时间" width="100">
<template slot-scope="scope">
{{ scope.row.开票时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150">
<template slot-scope="scope">
<el-tooltip effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
size="mini"
type="text"
icon="el-icon-edit-outline"
@click.stop="openEditInvoiceRecordingDialog(scope.row); flag = 2"/>
</div>
</el-tooltip>
<el-tooltip effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-delete"
@click.stop="delInvoiceRecordingDialog(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
<!--营销经理选择-->
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="500px">
<span>姓名</span>
<el-input v-model="name" clearable size="small" style="width: 200px"/>
<el-button size="small" type="success" style="margin-left: 10px;" icon="el-icon-search" @click="searchName">查询</el-button>
<!--<span>责权省份</span>-->
<!--<el-select v-model="ProvinceValue" clearable filterable placeholder="请选择省份" style="margin-right: 10px" size="small" @change="changeProvince">-->
<!--<el-option-->
<!--v-for="item in Province"-->
<!--:key="item.value"-->
<!--:label="item.label"-->
<!--:value="item.value"/>-->
<!--</el-select>-->
<div style="margin-top: 5px">
<el-table :data="dataPeople" border size="mini" stripe style="width: 100%; text-align: center;" highlight-current-row @row-click="handleChange">
<el-table-column label="销售经理" align="center" >
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="性别" align="center">
<template slot-scope="scope">
{{ scope.row.性别 }}
</template>
</el-table-column>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="offName">取消</el-button>
<el-button type="primary" @click="getName">确认</el-button>
</div>
</el-dialog>
<!--增加开票记录-->
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="750px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="客户名称" prop="客户名称">
<el-input v-model="form.客户名称" readonly size="small" placeholder="请双击选择客户" style="width:200px" clearable @dblclick.native="CustomerChange()" @clear="clearCustomer()"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票抬头" prop="发票抬头">
<el-input v-model="form.发票抬头" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="税号" prop="税号">
<el-input v-model="form.税号" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票电话" prop="开票电话">
<el-input v-model="form.开票电话" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票地址" prop="开票地址">
<el-input v-model="form.开票地址" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开户行" prop="开户行">
<el-input v-model="form.开户行" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="银行账号" prop="银行账号">
<el-input v-model="form.银行账号" clearable size="small" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票金额" prop="开票金额">
<el-input v-model="form.开票金额" clearable size="small" placeholder="请输入开票金额" style="width:200px"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票时间" prop="开票时间">
<el-date-picker
v-model="form.开票时间"
:picker-options="pickerOptions"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开票时间"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="备注">
<el-input v-model="form.备注" clearable size="small" placeholder="请输入备注" style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible1 = false">取消</el-button>
<el-button type="primary" @click="submit('form')"> </el-button>
</div>
</el-dialog>
<!--客户选择-->
<el-dialog :visible.sync="dialogCustomerFormVisible" title="选择客户" center width="600px">
<el-input v-model="Customer" clearable size="small" style="width:200px" placeholder="请输入客户名称"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize1 = 30;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
<el-table v-loading="loading1" :data="CustomerData" border stripe size="mini" highlight-current-row height="400" show-overflow-tooltip style="height: 330px; margin-top: 5px" @row-click="handleCustomerChange">
<el-table-column label="省份" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.省份 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="联系人" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column label="联系电话" align="center">
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="PageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize1"
:total="total1"
style="margin-top: 10px"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange1"
@current-change="handleCurrentChange1"/>
<div slot="footer" class="dialog-footer">
<el-button @click="offCustomerChange">取消</el-button>
<el-button type="primary" @click="getCustomerCode"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { initProject, searchTableData1, searchTableData2, revisionOfTaxRate, selectProvince, SelectMarketingManager, fetchCustomerData, addSubmit, editSubmit, delSubmit } from '@/api/MarketingCenter/InvoiceRecord'
export default {
components: {
elInput
},
data() {
return {
pickerOptions: {},
timetime: '',
name: '',
projectid: '', // 项目流水号
entryName: [], // 项目名称数组
entryNameValue_check: '', // 项目名称check
entryNameValue: '', // 项目名称
peopleid_check: '', // 销售经理check
MarketingManagerValue: '', // 销售经理
peopleid: '', // 营销经理流水号
startTime_check: '', // 开始时间check
startTime: '', // 开始时间
endTime_check: '', // 结束时间check
endTime: '', // 结束时间
listLoading1: false, // 合同信息表格加载动画
tableData1: [], // 合同信息表格数据
PageCurrent: 1,
PageCurrent1: 1,
PageSize1: 30,
PageSize: 30,
total1: null,
total: null,
tableData2: [], // 开票记录表格数据
listLoading2: false, // 开票记录表格加载动画
taxRate: '', // 税率
dialogFormVisiblePeople: false, // 营销经理对话框显示隐藏
ProvinceValue: '', // 责权省份
Province: [], // 责权省份数组
dataPeople: [], // 营销经理数组
peoplename: '', // 营销经理姓名
title: '', // 开票记录对话框标题
dialogFormVisible1: false, // 开票记录对话框显示隐藏
dialogCustomerFormVisible: false, // 打开选择客户对话框
flag: '', // 开票记录增加编辑旗帜变量
Customer: '', // 客户选择
CustomerData: [], // 客户信息表格
loading1: false, // 客户信息表加载框
CustomerCode: '',
invoiceRecordingCode: '',
form: {
客户名称: '',
发票抬头: '',
税号: '',
开票电话: '',
开票地址: '',
开户行: '',
银行账号: '',
开票金额: '',
开票时间: '',
备注: ''
},
rules: {
客户名称: [{ required: true, message: '请双击选择客户名称', trigger: 'change' }],
开票金额: [{ required: true, message: '请双击选择客户名称', trigger: 'blur' }],
开票时间: [{ required: true, message: '请双击选择客户名称', trigger: 'change' }]
}
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
changeTime() {
this.pickerOptions = Object.assign({}, this.pickerOptions, {
disabledDate: (time) => {
console.log(this.timetime)
return time.getTime() < Date.parse(this.timetime)
}
})
},
searchName() { // 模糊查询姓名
SelectMarketingManager(this.name).then(response => {
this.dataPeople = response.data
})
},
openName() {
this.name = ''
SelectMarketingManager(this.name).then(response => {
this.dataPeople = response.data
})
this.dialogFormVisiblePeople = true
},
// 初始化条件
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
},
// 查询项目信息表格
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) { this.entryNameValue_check = 0 } else { this.entryNameValue_check = 1 }
if (this.MarketingManagerValue === '' || this.MarketingManagerValue === null) { this.peopleid_check = 0 } else { this.peopleid_check = 1 }
if (this.startTime === '' || this.startTime === null) { this.startTime_check = 0 } else { this.startTime_check = 1 }
if (this.endTime === '' || this.endTime === null) { this.endTime_check = 0 } else { this.endTime_check = 1 }
this.listLoading1 = true
searchTableData1(this.PageCurrent, this.PageSize, this.entryNameValue, this.peopleid, this.entryNameValue_check, this.peopleid_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime).then(response => {
this.listLoading1 = false
const data = response.data
for (let i = 0; i < data.rows.length; i++) {
data.rows[i].是是否禁用税率编辑 = true
data.rows[i].合同签订日期 = data.rows[i].合同签订日期.substring(0, data.rows[i].合同签订日期.length - 8)
}
this.tableData1 = data.rows
this.total = data.total
})
this.tableData2 = []
},
// 项目信息表格改变每页显示条数
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.fetchTableData1()
this.tableData2 = []
},
// 项目信息表格翻页
handleCurrentChange(val) {
this.PageCurrent = val
this.fetchTableData1()
this.tableData2 = []
},
// 查询开票记录表格
fetchTableData2(row) {
this.taxRate = row.税率
this.projectid = row.项目流水号
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
},
// 开票记录合计
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 6) {
sums[index] = '项目开票合计:'
return
} else if (index === 7) {
const values = data.map(item => Number(item['开票金额']))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return Number(prev) + Number(curr)
} else {
return Number(prev)
}
}, 0)
sums[index] += ' 万元(含税)'
} else {
sums[index] = 'N/A'
}
} else if (index === 8) {
sums[index] = this.taxRate * 100 + '% (税率)'
return
} else if (index === 9) {
sums[index] = (parseFloat(sums[7]) - (parseFloat(sums[7]) / (1 + parseFloat(sums[8]) / 100)).toFixed(2)).toFixed(2) + ' 万元(税额)'
return
} else if (index === 10) {
sums[index] = (parseFloat(sums[7]) / (1 + parseFloat(sums[8]) / 100)).toFixed(2) + ' 万元(未税)'
return
}
})
return sums
},
// 双击解锁选定行的税率编辑
unlockEditor(row) {
row.是是否禁用税率编辑 = false
},
// 离开锁定选定行的税率编辑
lockEditor(row) {
row.是是否禁用税率编辑 = true
},
// 改变税率
revisionOfTaxRate(row) {
revisionOfTaxRate(row.项目流水号, row.税率).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.fetchTableData1()
this.fetchTableData2(row)
} else {
this.$message.error('数据占用')
}
})
},
// 点击选择营销经理
handleChange(row) {
this.peopleid = row.营销经理流水号
this.peoplename = row.姓名
},
// 营销经理对话框确定
getName() {
this.dialogFormVisiblePeople = false
this.MarketingManagerValue = this.peoplename
},
// 营销经理对话框取消
offName() {
this.dialogFormVisiblePeople = false
this.peopleid = ''
this.peoplename = ''
},
// 通过省份查对应的营销经理
changeProvince() {
SelectMarketingManager(this.ProvinceValue).then(response => {
this.dataPeople = response.data
})
},
// 清空营销经理输入框
clearPeople() {
this.peopleid = ''
},
// 打开增加开票记录对话框
openAddInvoiceRecordingDialog(row) {
this.projectid = row.项目流水号
this.timetime = row.合同签订日期
this.changeTime()
this.addForm('form')
this.title = '增加开票记录'
this.dialogFormVisible1 = true
},
// 打开选择
CustomerChange() {
this.fetchCustomerData()
this.dialogCustomerFormVisible = true
},
offCustomerChange() {
this.dialogCustomerFormVisible = false
},
fetchCustomerData() {
this.loading1 = true
this.getTable(fetchCustomerData, [this.PageCurrent1, this.PageSize1, this.Customer], ['CustomerData', 'total1', 'loading1'])
},
handleSizeChange1(val) {
this.PageCurrent1 = 1
this.PageSize1 = val
this.fetchCustomerData()
},
handleCurrentChange1(val) {
this.PageCurrent1 = val
this.fetchCustomerData()
},
handleCustomerChange(row) {
this.CustomerCode = row.客户流水号
this.form.客户名称 = row.客户名称
this.form.发票抬头 = row.客户名称
this.form.税号 = row.税号
this.form.开票电话 = row.传真
this.form.开票地址 = row.地址
this.form.开户行 = row.开户行
this.form.银行账号 = row.银行账号
},
getCustomerCode() {
this.dialogCustomerFormVisible = false
},
clearCustomer() {
this.CustomerCode = ''
this.form.客户名称 = ''
this.form.发票抬头 = ''
this.form.税号 = ''
this.form.开票电话 = ''
this.form.开票地址 = ''
this.form.开户行 = ''
this.form.银行账号 = ''
},
// 提交增加或编辑
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag === 1) {
this.addSubmit()
} else if (this.flag === 2) {
this.editSubmit()
}
}
})
},
// 增加开票记录
addSubmit() {
addSubmit(this.projectid, this.CustomerCode, this.form.开票金额, this.form.开票时间, this.form.备注).then(response => {
if (response.data[0].result === '1') {
this.$message.success('增加成功')
this.dialogFormVisible1 = false
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
} else {
this.$message.error('数据占用')
}
})
},
openEditInvoiceRecordingDialog(row) {
this.editForm(row, 'form')
this.title = '编辑开票记录'
this.dialogFormVisible1 = true
this.CustomerCode = row.客户流水号
this.form.客户名称 = row.客户名称
this.form.发票抬头 = row.客户名称
this.form.税号 = row.税号
this.form.开票电话 = row.传真
this.form.开票地址 = row.地址
this.form.开户行 = row.开户行
this.form.银行账号 = row.银行账号
this.form.开票金额 = row.开票金额
this.form.开票时间 = row.开票时间
this.form.备注 = row.备注
this.invoiceRecordingCode = row.开票记录流水号
},
editSubmit() {
editSubmit(this.CustomerCode, this.form.开票金额, this.form.开票时间, this.form.备注, this.invoiceRecordingCode).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改成功')
this.dialogFormVisible1 = false
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
} else {
this.$message.error('数据占用')
}
})
},
delInvoiceRecordingDialog(row) {
function a() {
searchTableData2(this.projectid).then(response => {
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].开票时间 = data[i].开票时间.substring(0, data[i].开票时间.length - 8)
}
this.tableData2 = data
})
}
this.deleteRow(delSubmit, row.开票记录流水号, a)
}
}
}
</script>
<style lang="scss">
/*.tableInput{*/
/* .el-textarea__inner, .el-radio__inner, .el-input__inner{*/
/* border: 1px solid #F56C6C !important*/
/* }*/
/*}*/
</style>

View File

@@ -0,0 +1,846 @@
<template>
<div>
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" filterable placeholder="项目名称" style="margin: 3px" size="small" clearable>
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSize = 30;PageCurrent = 1;fetchTableData1()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoading1"
:data="tableData1"
style="width: 100%;margin-top: 3px;"
height="600"
border
stripe
size="mini"
highlight-current-row
@row-click="fetchTableData2">
<el-table-column align="center" label="合同编号" width="150">
<template slot-scope="scope">
<el-tag size="small" type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="已完成进度" width="100">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="100">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="90">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称" width="200" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="80" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="130" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注">
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="300px">
<template slot-scope="scope">
<el-button
:disabled="scope.row.是否禁用增加履约保证金"
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="openPerformanceBondDialog(scope.row); flag = 1">履约保证金</el-button>
<el-button
:disabled="scope.row.是否禁用增加履约保函"
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="addPerformanceGuarantee(scope.row)">履约保函</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 3px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<template>
<el-tabs v-model="activeName" type="card" style="margin: 0px">
<el-tab-pane :disabled="performanceBondDisabled" label="履约保证金" name="first">
<el-table
v-loading="listLoading2"
:data="tableData2"
highlight-current-row
style="width: 100%;margin-top: 3px;"
height="130"
border
size="mini">
<el-table-column align="center" label="履约保证金金额">
<template slot-scope="scope">
<el-tag type="primary" size="small">{{ scope.row.履约保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="保证金类型">
<template slot-scope="scope">
{{ scope.row.保证金类型 }}
</template>
</el-table-column>
<el-table-column align="center" label="收回条件">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="截止时间">
<template slot-scope="scope">
{{ scope.row.提前X天提醒我 }}天内收回
</template>
</el-table-column>
<el-table-column align="center" label="是否收回">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 1" slot="reference" size="small" type="success" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="parseInt(scope.row.是否收回) === 0" slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? scope.row.实际收回日期 = '暂未收回' : scope.row.实际收回日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="状态">
<template slot-scope="scope">
<el-popover
placement="top-start"
title="收回计划"
width="200"
trigger="hover">
<div v-show="(scope.row.计划收款日期 === '' || scope.row.计划收款日期 === null) && parseInt(scope.row.是否收回)!== 1 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.计划收款日期 !== '' && scope.row.计划收款日期 !== null && parseInt(scope.row.是否收回)!== 1">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.计划收款日期 }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<div v-show="parseInt(scope.row.是否收回)=== 1 " style="text-align: center">
<h4>已于{{ scope.row.实际收回日期 }}收回</h4>
</div>
<el-tag v-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null && parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 1" slot="reference" size="small" type="warning" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 2" slot="reference" type="danger" size="small" style="width: 66px">已经拖期</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 0 && parseInt(scope.row.状态) === 0" slot="reference" type="primer" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-else-if="scope.row.计划收款日期!==''&& scope.row.计划收款日期!==null &&parseInt(scope.row.是否收回) === 1" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.计划收款日期===''||scope.row.计划收款日期===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
</el-popover>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200px">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="收回" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用收回"
size="mini"
type="text"
icon="el-icon-money"
@click.stop="takeBack(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用编辑"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-edit-outline"
@click.stop="openEditPerformanceBondDialog(scope.row); flag = 2"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用删除"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-delete"
@click.stop="delPerformanceBond(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :disabled="performanceGuaranteeDisabled" label="履约保函" name="second">
<div v-show="performanceGuaranteeShow">
<el-button type="danger" icon="el-icon-delete" plain size="small" style="float: right;display: inline-block" @click="delPerformanceGuarantee">删除</el-button>
<div style="width: 150px; height: 150px; margin: auto;left: 50%;right: 50%">
<el-upload
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:file-list="fileList"
:before-upload="beforeUpload"
:on-success="onSuccess"
:action="upload3 + '?ProjectId=' + projectId"
list-type="picture-card">
<i class="el-icon-plus"/>
</el-upload>
<el-dialog :visible.sync="dialogVisible">
<img :src="dialogImageUrl" width="100%" alt="">
</el-dialog>
</div>
</div>
</el-tab-pane>
</el-tabs>
</template>
</el-card>
<el-dialog :visible.sync="dialogTimeVisible" title="实际收回日期" center style="min-height: 300px" width="23%">
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-form-item label="实际收回日期" prop="实际收回日期">
<el-date-picker
v-model="form.实际收回日期"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择实际收回日期"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffTime('form')">取消</el-button>
<el-button type="primary" @click="submitTime('form')"> </el-button>
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="40%">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="保证金金额" prop="保证金金额">
<el-input-number v-model="form2.保证金金额" :precision="2" :step="1" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="保证金类型" prop="保证金类型">
<el-select v-model="form2.保证金类型" filterable placeholder="请选择保证金类型" style="width: 200px" size="small">
<el-option
v-for="item in performanceBondType"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="收回条件" prop="收回条件">
<el-select v-model="form2.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
<el-option
v-for="item in plannedTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="截止时间(天)" prop="截止时间">
<el-input-number v-model="form2.截止时间" placeholder="请输入截止时间" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOffPerformanceBondDialog('form2')">取消</el-button>
<el-button type="primary" @click="submitPerformanceBondDialog('form2')"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import request from '@/utils/request'
import elInput from 'element-ui/packages/input'
import { upload3, readImg } from '@/utils/request'
import { initProject, searchTableData1, typeOfPerformanceBond, searchTableData2, takeBack, executionProgressID, initType, addPerformanceBond, editPerformanceBond, delPerformanceBond, addPerformanceGuarantee, delPerformanceGuarantee } from '@/api/MarketingCenter/PerformanceBond'
export default {
components: {
elInput
},
data() {
const validateValue = (rule, value, callback) => {
if (value === 0) {
callback(new Error('金额不能为0'))
} else {
callback()
}
}
return {
upload3: upload3,
title1: '', // 履约保证金新增或编辑对话框
entryNameValue: '', // 查询条件_项目名称
entryName: [], // 查询条件_项目名称数组
startTime: '', // 查询条件_开始时间
endTime: '', // 查询条件_结束时间
PageSize: 30, // 项目信息表格初始一页显示十条
PageCurrent: 1, // 项目信息表格一次翻一页
total: null,
tableData1: [], // 项目信息表格数据
listLoading1: false, // 项目信息表格加载动画
flag: '', // 旗帜变量
activeName: 'first', // 标签页初始
projectId: '', // 项目流水号中间变量
tableData2: [], // 履约保证金信息
listLoading2: false,
dialogTimeVisible: false,
performanceBondCode: '', // 履约保证金流水号
dialogFormVisible1: false, // 履约保证金对话框
plannedTime: [],
performanceBondType: [],
performanceBondDisabled: true, // 履约保证金标签页是否禁用
performanceGuaranteeDisabled: true, // 履约保函是否禁用
dialogVisible: false, // 履约保函复印件
dialogImageUrl: '',
fileList: [],
performanceGuaranteeShow: true,
form: {
实际收回日期: ''
},
form2: {
保证金金额: '',
保证金类型: 1,
收回条件: 1,
截止时间: 15
},
rules: { // 表单验证规则
实际收回日期: [{ required: true, message: '请选择实际收回日期', trigger: 'change' }]
},
rules2: { // 表单验证规则
保证金金额: [
{ required: true, message: '请输入保证金金额', trigger: 'change' },
{ required: true, trigger: 'blur', validator: validateValue }],
保证金类型: [{ required: true, message: '请选择保证金类型', trigger: 'change' }],
收回条件: [{ required: true, message: '请选择收回条件', trigger: 'change' }],
截止时间: [{ required: true, message: '请输入截止时间', trigger: 'change' }]
}
}
},
created() {
this.init()
this.fetchTableData1()
},
methods: {
// 初始化条件
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'plannedTime')
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'performanceBondType')
},
// 查询合同(项目)信息
fetchTableData1() {
if (this.entryNameValue === '' || this.entryNameValue === null) {
this.entryNameValue_check = 0
} else {
this.entryNameValue_check = 1
}
if (this.startTime === '' || this.startTime === null) {
this.startTime_check = 0
} else {
this.startTime_check = 1
}
if (this.endTime === '' || this.endTime === null) {
this.endTime_check = 0
} else {
this.endTime_check = 1
}
this.listLoading1 = true
searchTableData1(this.PageCurrent, this.PageSize, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime).then(response => {
this.tableData2 = []
this.listLoading1 = false
const data = response.data
for (let i = 0; i < data.rows.length; i++) {
data.rows[i].合同签订日期 = data.rows[i].合同签订日期.substring(0, data.rows[i].合同签订日期.length - 8)
parseInt(data.rows[i].履约保证金类型) !== 0 ? data.rows[i].是否禁用增加履约保证金 = true : data.rows[i].是否禁用增加履约保证金 = false
parseInt(data.rows[i].履约保证金类型) !== 0 ? data.rows[i].是否禁用增加履约保函 = true : data.rows[i].是否禁用增加履约保函 = false
}
this.tableData1 = data.rows
this.total = data.total
})
},
// 项目信息表格改变每页显示条数
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.tableData2 = []
this.fetchTableData1()
},
// 项目信息表格翻页
handleCurrentChange(val) {
this.PageCurrent = val
this.tableData2 = []
this.fetchTableData1()
},
// 履约保证金查询
fetchTableData2(row) {
this.projectId = row.项目流水号
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.tableData2 = []
this.performanceGuaranteeShow = false
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
}
})
},
takeBack(row) {
this.addForm('form')
this.performanceBondCode = row.履约保证金流水号
this.dialogTimeVisible = true
},
callOffTime() {
this.dialogTimeVisible = false
},
submitTime(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
takeBack(this.performanceBondCode, this.form.实际收回日期).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.dialogTimeVisible = false
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
this.tableData2 = []
this.performanceGuaranteeShow = false
}
})
} else {
this.$message.error('操作失败')
}
})
}
})
},
openPerformanceBondDialog(row) {
this.addForm('form2')
this.title1 = '新增履约保证金'
this.dialogFormVisible1 = true
this.projectId = row.项目流水号
this.tableData2 = []
},
callOffPerformanceBondDialog() {
this.dialogFormVisible1 = false
},
submitPerformanceBondDialog(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag === 1) {
addPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.fetchTableData1()
this.dialogFormVisible1 = false
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
this.tableData2 = []
this.performanceGuaranteeShow = false
}
})
} else {
this.$message.error('操作失败')
}
})
} else if (this.flag === 2) {
editPerformanceBond(this.projectId, this.form2.保证金金额, this.form2.保证金类型, this.form2.收回条件, this.form2.截止时间, this.performanceBondCode).then(response => {
if (response.data[0].result === '1') {
this.$message.success('操作成功')
this.dialogFormVisible1 = false
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
this.tableData2 = []
this.performanceGuaranteeShow = false
}
})
} else {
this.$message.error('操作失败')
}
})
}
}
})
},
openEditPerformanceBondDialog(row) {
this.dialogFormVisible1 = true
this.performanceBondCode = row.履约保证金流水号
this.form2.保证金金额 = row.履约保证金金额
this.form2.保证金类型 = row.保金类型
this.form2.收回条件 = parseInt(row.执行进度流水号)
this.title1 = '编辑履约保证金'
},
delPerformanceBond(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delPerformanceBond(this.projectId, row.履约保证金流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.activeName = 'first'
this.listLoading2 = true
this.fetchTableData1()
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else {
this.$message.error('数据占用')
}
})
})
},
addPerformanceGuarantee(row) {
this.projectId = row.项目流水号
this.$confirm('是否新增履约保函', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addPerformanceGuarantee(this.projectId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.fetchTableData1()
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.tableData2 = []
this.performanceGuaranteeShow = false
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
}
})
} else {
this.$message.error('添加失败')
}
})
})
},
async getFileList() {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 合同信息管理_履约保证金_履约保函 where 是否启用 = 1 and 项目流水号 = ${this.projectId}`
}
})
this.fileList = data.map(item => {
return {
_id: item.履约保函流水号,
name: item.文件标识,
url: readImg + item.文件标识
}
})
},
async handleRemove(file, fileList) {
const { data } = await request({
url: '',
method: 'post',
data: {
type: '4',
name: `update 合同信息管理_履约保证金_履约保函 set 是否启用 = 0 where 履约保函流水号 = ${file._id}`
}
})
if (data[0].result === '0') {
this.$message.error('上传失败')
}
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url
this.dialogVisible = true
},
beforeUpload(file) {
const isJPG = /^image\/.*/.test(file.type)
const isLt4M = file.size / 1024 / 1024 < 4
const isInvoiceNum = !!this.projectId
if (!isJPG) {
this.$message.error('只能上传图片。。')
}
if (!isLt4M) {
this.$message.error('上传图片大小不能超过 4MB!')
}
return isJPG && isLt4M && isInvoiceNum
},
onSuccess(res, file, fileList) {
fileList = []
if (res[0].result === '1') {
this.getFileList()
} else {
this.$message.error('上传失败')
}
},
delPerformanceGuarantee() {
this.$confirm('是否删除履约保函', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delPerformanceGuarantee(this.projectId).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.fetchTableData1()
typeOfPerformanceBond(this.projectId).then(response => {
const data = response.data[0].履约保证金类型
return data
}).then(data => {
if (data === 1) {
this.activeName = 'first'
this.listLoading2 = true
this.performanceBondDisabled = false
this.performanceGuaranteeDisabled = true
searchTableData2(this.projectId).then(response => {
this.listLoading2 = false
const data = response.data
for (let i = 0; i < data.length; i++) {
data[i].实际收回日期 !== '' && data[i].实际收回日期 !== null ? data[i].实际收回日期 = data[i].实际收回日期.substring(0, data[i].实际收回日期.length - 8) : data[i].实际收回日期
data[i].节点日期 !== '' && data[i].节点日期 !== null ? data[i].节点日期 = data[i].节点日期.substring(0, data[i].节点日期.length - 8) : data[i].节点日期
data[i].计划收款日期 !== '' && data[i].计划收款日期 !== null ? data[i].计划收款日期 = data[i].计划收款日期.substring(0, data[i].计划收款日期.length - 8) : data[i].计划收款日期
data[i].计划收款日期 === '' || data[i].计划收款日期 === null || parseInt(data[i].是否收回) === 1 ? data[i].是否禁用收回 = true : data[i].是否禁用收回 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用编辑 = true : data[i].是否禁用编辑 = false
parseInt(data[i].是否收回) === 1 ? data[i].是否禁用删除 = true : data[i].是否禁用删除 = false
}
this.tableData2 = data
})
} else if (data === 2) {
this.activeName = 'second'
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = false
this.performanceGuaranteeShow = true
this.getFileList()
} else {
this.$message.warning('未缴纳履约保证金')
this.tableData2 = []
this.performanceGuaranteeShow = false
this.performanceBondDisabled = true
this.performanceGuaranteeDisabled = true
}
})
} else {
this.$message.error('删除失败')
}
})
})
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,933 @@
<template>
<div class="app-container">
<!--顶栏结构-->
<el-card>
<span>项目名称</span>
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称:" size="small" style="margin:3px;">
<el-option
v-for="item in entryName"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 10px">开始日期</span>
<el-date-picker
v-model="startTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择开始日期"/>
<span style="margin-left: 10px">结束日期</span>
<el-date-picker
v-model="endTime"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择结束日期"/>
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="PageSizeProject = 30;PageCurrentProject = 1;searchTableDataProject()">查询</el-button>
</el-card>
<el-card>
<el-table
v-loading="listLoadingProject"
:data="projectTableData"
style="width: 100%;margin-top: 3px;"
height="650"
border
stripe
size="mini"
highlight-current-row
@row-click="fetchTableData1">
<el-table-column align="center" label="合同编号" width="150">
<template slot-scope="scope">
<el-tag size="small" type="primary">{{ scope.row.合同编号 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="项目名称" width="160" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="已完成进度" width="100">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同签订日期" width="130">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="销售经理" width="100">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column align="center" label="客户名称" width="250" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系人" width="100" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.联系人 }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话" width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.电话 }}
</template>
</el-table-column>
<el-table-column align="center" label="合同信息备注" >
<template slot-scope="scope">
{{ scope.row.合同信息备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="150px">
<template slot-scope="scope">
<el-button
:disabled="scope.row.是否禁用增加安全保证金"
size="mini"
type="text"
icon="el-icon-circle-plus-outline"
@click.stop="addSafetyMargin(scope.row);flag1 = 1">安全保证金
</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 3px;">
<el-pagination
:current-page="PageCurrentProject"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSizeProject"
:total="totalProject"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChangeProject"
@current-change="handleCurrentChangeProject"/>
</div>
</el-card>
<!--安全保证金表格-->
<el-card>
<el-table
v-loading="tableData1Loading"
:data="tableData1"
style="width: 100%"
highlight-current-row
border
stripe
size="mini"
@row-click="fetchTableData2">
<!--<el-table-column align="center" label="项目名称" width="300">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.项目名称 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="保证金金额" width="100">
<template slot-scope="scope">
<el-tag type="primary" size="small">{{ scope.row.保证金金额 }}</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="交付日期" width="120">
<template slot-scope="scope">
{{ scope.row.交付日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="收回条件" width="100">
<template slot-scope="scope">
{{ scope.row.执行进度名 }}
</template>
</el-table-column>
<el-table-column align="center" label="截止时间(天)" width="120">
<template slot-scope="scope">
{{ scope.row.提前x天提醒 }}天内收回
</template>
</el-table-column>
<el-table-column align="center" label="扣款金额" width="100">
<template slot-scope="scope">
{{ scope.row.扣款金额 }}
</template>
</el-table-column>
<el-table-column :label="AmountReceivable" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.应收回金额 }}
</template>
</el-table-column>
<el-table-column label="实际收回金额" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? '0' : scope.row.应收回金额 }}
</template>
</el-table-column>
<!--<el-table-column align="center" label="计划收回日期" width="150">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.预计收回日期 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="是否收回" width="100">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否收回) === 2" slot="reference" size="small" type="success" style="width: 66px">已收回</el-tag>
<el-tag v-else-if="parseInt(scope.row.是否收回) === 1" slot="reference" type="danger" size="small" style="width: 66px">未收回</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="实际收回日期" width="130">
<template slot-scope="scope">
{{ scope.row.实际收回日期 === '' || scope.row.实际收回日期 === null ? '未收回' : scope.row.实际收回日期 }}
</template>
</el-table-column>
<el-table-column align="center" label="状态" width="100">
<template slot-scope="scope">
<el-popover
placement="top-start"
title="收回计划"
width="200"
trigger="hover">
<div v-show="(scope.row.预计收回日期 === '' || scope.row.预计收回日期 === null) && parseInt(scope.row.是否收回)!== 2 " style="text-align: center">
<h4>{{ scope.row.执行进度名 }} 未完成</h4>
</div>
<div v-show="scope.row.预计收回日期 !== '' && scope.row.预计收回日期 !== null && parseInt(scope.row.是否收回)!== 2">
<h4>{{ scope.row.执行进度名 }}{{ scope.row.节点日期 }}完成计划于{{ scope.row.预计收回日期 }}进行收款距离计划截止还剩{{ parseInt(scope.row.剩余天数) > 0 ? scope.row.剩余天数 : 0 }}</h4>
</div>
<div v-show="parseInt(scope.row.是否收回)=== 2 " style="text-align: center">
<h4>已于{{ scope.row.实际收回日期 }}收回</h4>
</div>
<el-tag v-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null && parseInt(scope.row.是否收回) === 1 && parseInt(scope.row.状态) === 1" slot="reference" size="small" type="warning" style="width: 66px">即将拖期</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null &&parseInt(scope.row.是否收回) === 1 && parseInt(scope.row.状态) === 2" slot="reference" type="danger" size="small" style="width: 66px">已经拖期</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null &&parseInt(scope.row.是否收回) === 1 && parseInt(scope.row.状态) === 0" slot="reference" type="primer" size="small" style="width: 66px">无计划</el-tag>
<el-tag v-else-if="scope.row.预计收回日期!==''&& scope.row.预计收回日期!==null &&parseInt(scope.row.是否收回) === 2" slot="reference" type="success" size="small" style="width: 66px">已完成</el-tag>
<el-tag v-else-if="scope.row.预计收回日期===''||scope.row.预计收回日期===null" slot="reference" size="small" style="width: 66px">进度未完</el-tag>
<div v-show="false">{{ scope.row.预计收回日期===''||scope.row.预计收回日期===null || parseInt(scope.row.是否收回) === 2 ? scope.row.是否禁用收回 = true : scope.row.是否禁用收回 = false }}</div>
<div v-show="false">{{ parseInt(scope.row.是否收回) === 2 ? scope.row.是否禁用扣款 = true : scope.row.是否禁用扣款 = false }}</div>
<div v-show="false">{{ parseInt(scope.row.是否收回) === 2 ? scope.row.是否禁用编辑 = true : scope.row.是否禁用编辑 = false }}</div>
<div v-show="false">{{ parseInt(scope.row.是否收回) === 2 ? scope.row.是否禁用删除 = true : scope.row.是否禁用删除 = false }}</div>
</el-popover>
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-tooltip class="item" effect="dark" content="收回" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用收回"
size="mini"
type="text"
icon="el-icon-money"
@click.stop="TakeBack(scope.row);flag1 = 5"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="扣款" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用扣款"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-coin"
@click.stop="Withdrawing(scope.row);flag1 = 3"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="编辑" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用编辑"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-edit-outline"
@click.stop="editSafetyMargin(scope.row);flag1 = 2"/>
</div>
</el-tooltip>
<el-tooltip class="item" effect="dark" content="删除" placement="top">
<div style="display: inline-block">
<el-button
:disabled="scope.row.是否禁用删除"
size="mini"
type="text"
style="margin-left: 20px"
icon="el-icon-delete"
@click.stop="delSafetyMargin(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div v-show="false" class="block" style="margin-top: 10px;">
<el-pagination
:current-page="PageCurrent"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"/>
</div>
</el-card>
<!--新增编辑保证金信息对话框-->
<el-dialog v-el-drag-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
<el-form ref="form" :model="form" :rules="rules1" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="保证金金额" prop="保证金金额">
<el-input-number v-model="form.保证金金额" :precision="2" :step="1" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="缴纳日期" prop="交付日期">
<el-date-picker
v-model="form.交付日期"
:picker-options="pickerOptions"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="请选择交付日期"/>
</el-form-item>
</el-col>
</el-row>
<!--<el-col :span="12">-->
<!--<el-form-item label="计划收回日期" prop="预计收回日期">-->
<!--<el-date-picker-->
<!--v-model="form.预计收回日期"-->
<!--style="width: 200px;"-->
<!--value-format="yyyy-MM-dd"-->
<!--size="small"-->
<!--type="date"-->
<!--placeholder="请选择计划收回日期"/>-->
<!--</el-form-item>-->
<!--</el-col>-->
<el-row>
<el-col :span="12">
<el-form-item label="收回条件" prop="收回条件">
<el-select v-model="form.收回条件" filterable placeholder="请选择收回条件" style="width: 200px" size="small">
<el-option
v-for="item in plannedTime"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="截止时间(天)" prop="提前X天提醒我">
<el-input-number v-model="form.提前X天提醒我" placeholder="请输入截止时间" style="width: 200px" size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="备注" prop="备注">
<el-input v-model="form.备注" type="textarea" autosize size="small" placeholder="请输入备注" style="width:575px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit1('form')"> </el-button>
</div>
</el-dialog>
<!--扣款记录增加-->
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogFormVisible2" center style="min-height: 300px" width="800px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="项目名称" prop="项目名称">
<el-input v-model="projectName" size="small" placeholder="请输入项目名称" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被扣款人" prop="被扣款人">
<el-input v-model="form2.被扣款人" size="small" placeholder="请输入被扣款人" style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="剩余金额" prop="剩余金额">
<el-input v-model="SurplusAmount" size="small" placeholder="请输入剩余金额" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="扣款金额" prop="扣款金额">
<el-input-number v-model="form2.扣款金额" :min="0" :max="maxMoney" :precision="2" :step="1" size="small" style="width: 200px" placeholder="请输入本次付款金额"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="扣款日期" prop="扣款日期">
<el-date-picker
v-model="form2.扣款日期"
:picker-options="pickerOptions1"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="扣款日期"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="扣款原因" prop="扣款原因">
<el-input v-model="form2.扣款原因" size="small" placeholder="扣款原因" style="width: 200px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form2')">取消</el-button>
<el-button type="primary" @click="submit1('form2')"> </el-button>
</div>
</el-dialog>
<!--扣款记录编辑-->
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible3" title="编辑" center style="min-height: 300px" width="800px">
<el-form ref="form3" :model="form3" :rules="rules3" label-position="left" label-width="120px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="项目名称" prop="项目名称">
<el-input v-model="projectName" size="small" placeholder="请输入项目名称" style="width:200px" disabled/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="被扣款人" prop="被扣款人">
<el-input v-model="form3.被扣款人" size="small" placeholder="请输入被扣款人" style="width:200px"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="扣款日期" prop="扣款日期">
<el-date-picker
v-model="form3.扣款日期"
:picker-options="pickerOptions1"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="扣款日期"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="扣款金额" prop="扣款金额">
<el-input-number v-model="form3.扣款金额" :min="0" :max="maxMoney1" :precision="2" :step="1" size="small" style="width: 200px" placeholder="请输入本次付款金额"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="扣款原因" prop="扣款原因">
<el-input v-model="form3.扣款原因" size="small" placeholder="扣款原因" style="width: 580px"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form3')">取消</el-button>
<el-button type="primary" @click="submit1('form3')"> </el-button>
</div>
</el-dialog>
<!--收回安全保证金-->
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible4" title="收回" center style="min-height: 300px" width="20%">
<el-form ref="form4" :model="form4" :rules="rules4" label-position="left" label-width="120px" class="demo-ruleForm">
<el-form-item label="项目名称" prop="项目名称">
<el-input v-model="projectName" size="small" placeholder="请输入项目名称" style="width:200px" disabled/>
</el-form-item>
<el-form-item label="剩余金额" prop="剩余金额">
<el-input v-model="form4.剩余金额" size="small" placeholder="请输入项目名称" style="width:200px" disabled/>
</el-form-item>
<el-form-item label="收回日期" prop="收回日期">
<el-date-picker
v-model="form4.收回日期"
:picker-options="pickerOptions2"
style="width: 200px;"
value-format="yyyy-MM-dd"
size="small"
type="date"
placeholder="收回日期"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form4')">取消</el-button>
<el-button type="primary" @click="submit1('form4')"> </el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible5" title="扣款" center style="min-height: 300px" width="800px">
<!--扣款记录表格-->
<el-card>
<el-table
v-loading="tableData2Loading"
:data="tableData2"
style="width: 100%;"
height="230"
highlight-current-row
border
stripe
size="mini">
<el-table-column align="center" label="扣款金额">
<template slot-scope="scope">
{{ scope.row.扣款金额 }}
</template>
</el-table-column>
<el-table-column align="center" label="被扣款人">
<template slot-scope="scope">
{{ scope.row.被扣款人 }}
</template>
</el-table-column>
<el-table-column align="center" label="扣款原因">
<template slot-scope="scope">
{{ scope.row.扣款原因 }}
</template>
</el-table-column>
<el-table-column align="center" label="扣款日期">
<template slot-scope="scope">
{{ scope.row.扣款日期 }}
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="200">
<template slot-scope="scope">
<el-button
:disabled="disabled"
size="mini"
type="text"
icon="el-icon-edit-outline"
@click.stop="editWithdrawing(scope.row);flag1 = 4">编辑</el-button>
<el-button
:disabled="disabled"
size="mini"
type="text"
icon="el-icon-delete"
@click.stop="delWithdrawing(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 3px;">
<el-pagination
:current-page="PageCurrent2"
:page-sizes="[10, 20, 30, 40]"
:page-size="PageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange2"
@current-change="handleCurrentChange2"/>
</div>
</el-card>
</el-dialog>
</div>
</template>
<script>
import elInput from 'element-ui/packages/input'
import { initProject, searchTable1, searchTable2, addSafetyMargin, editSafetyMargin, delSafetyMargin, Withdrawing, delWithdrawing, edtWithdrawing, TakeBack, searchTableDataProject, executionProgressID } from '@/api/MarketingCenter/SafetyMargin'
export default {
components: {
elInput
},
data() {
const validateValue = (rule, value, callback) => {
if (value === 0) {
callback(new Error('金额不能为0'))
} else {
callback()
}
}
return {
pickerOptions: {},
pickerOptions1: {},
pickerOptions2: {},
timetime: '',
timetime1: '',
timetime2: '',
listLoadingProject: false, // 项目信息加载动画
projectTableData: [], // 项目信息表格
startTime: '', // 开始时间
endTime: '', // 结束时间
PageCurrentProject: 1, // 项目信息表格翻页
PageSizeProject: 30, // 项目信息表格每页显示条数
totalProject: null, // 总条数
plannedTime: [], // 执行情况
entryNameValue_check: '',
startTime_check: '',
endTime_check: '',
disabled: false,
AmountReceivable: '应收回金额',
WithdrawingCode: '',
SurplusAmount: '',
maxMoney: null,
maxMoney1: null,
code: '', // 安全保证金流水号
projectCode: '',
projectName: '',
flag1: null,
entryName: [], // 项目名称
entryNameValue: '', // 项目名称数组
tableData1: [], // 安全保证金信息表数组
tableData2: [], // 安全保证金信息表数组
tableData1Loading: false, // 安全保证金信息表加载动画
tableData2Loading: false, // 安全保证金信息表加载动画
PageCurrent: 1,
PageSize: 30,
total: null,
PageCurrent2: 1,
PageSize2: 30,
total2: null,
radio: '1',
title: '',
title2: '',
entryName1: [],
dialogFormVisible1: false,
dialogFormVisible2: false,
dialogFormVisible3: false,
dialogFormVisible4: false,
dialogFormVisible5: false,
form: {
备注: '',
项目名称: '',
保证金金额: '',
交付日期: '',
预计收回日期: '',
提前X天提醒我: 15,
收回条件: 1
},
form2: {
扣款金额: '',
被扣款人: '',
扣款日期: '',
扣款原因: ''
},
form3: {
扣款金额: '',
被扣款人: '',
扣款日期: '',
扣款原因: ''
},
form4: {
收回日期: '',
剩余金额: ''
},
rules1: { // 表单验证规则
项目名称: [{ required: true, message: '请选择项目', trigger: 'change' }],
保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'blur' },
{ required: true, trigger: 'blur', validator: validateValue }],
交付日期: [{ required: true, message: '请选择交付日期', trigger: 'change' }],
预计收回日期: [{ required: true, message: '请选择预计收回日期', trigger: 'change' }],
收回条件: [{ required: true, message: '请选择收回条件', trigger: 'change' }],
提前X天提醒我: [{ required: true, message: '提前X天提醒我', trigger: 'blur' }]
},
rules2: { // 表单验证规则
扣款金额: [
{ required: true, message: '请输入本次付款金额', trigger: 'blur' },
{ required: true, trigger: 'blur', validator: validateValue }],
被扣款人: [{ required: true, message: '请输入被扣款人', trigger: 'blur' }],
扣款日期: [{ required: true, message: '请选择扣款日期', trigger: 'change' }]
},
rules3: { // 表单验证规则
扣款金额: [
{ required: true, message: '请输入本次付款金额', trigger: 'blur' },
{ required: true, trigger: 'blur', validator: validateValue }],
被扣款人: [{ required: true, message: '请输入被扣款人', trigger: 'blur' }],
扣款日期: [{ required: true, message: '请选择扣款日期', trigger: 'change' }]
},
rules4: { // 表单验证规则
收回日期: [{ required: true, message: '请选择收回日期', trigger: 'change' }]
}
}
},
created() {
this.init()
this.searchTableDataProject()
},
methods: {
changeTime() {
this.pickerOptions = Object.assign({}, this.pickerOptions, {
disabledDate: (time) => {
console.log(this.timetime)
return time.getTime() < Date.parse(this.timetime)
}
})
},
changeTime1() {
this.pickerOptions1 = Object.assign({}, this.pickerOptions1, {
disabledDate: (time) => {
console.log(this.timetime1)
return time.getTime() < Date.parse(this.timetime1)
}
})
},
changeTime2() {
this.pickerOptions2 = Object.assign({}, this.pickerOptions2, {
disabledDate: (time) => {
console.log(this.timetime2)
return time.getTime() < Date.parse(this.timetime2)
}
})
},
init() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName1')
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'plannedTime')
},
// 查询合同(项目)信息
searchTableDataProject() {
if (this.entryNameValue === '' || this.entryNameValue === null) {
this.entryNameValue_check = 0
} else {
this.entryNameValue_check = 1
}
if (this.startTime === '' || this.startTime === null) {
this.startTime_check = 0
} else {
this.startTime_check = 1
}
if (this.endTime === '' || this.endTime === null) {
this.endTime_check = 0
} else {
this.endTime_check = 1
}
this.listLoadingProject = true
searchTableDataProject(this.PageCurrentProject, this.PageSizeProject, this.entryNameValue, this.entryNameValue_check, this.startTime_check, this.endTime_check, this.startTime, this.endTime).then(response => {
this.tableData1 = []
this.tableData2 = []
this.listLoadingProject = false
const data = response.data
for (let i = 0; i < data.rows.length; i++) {
data.rows[i].合同签订日期 = data.rows[i].合同签订日期.substring(0, data.rows[i].合同签订日期.length - 8)
parseInt(data.rows[i].安全保证金类型) === 1 ? data.rows[i].是否禁用增加安全保证金 = true : data.rows[i].是否禁用增加安全保证金 = false
}
this.projectTableData = data.rows
this.totalProject = data.total
})
},
// 项目信息表格改变每页显示条数
handleSizeChangeProject(val) {
this.PageCurrentProject = 1
this.PageSizeProject = val
this.searchTableDataProject()
},
// 项目信息表格翻页
handleCurrentChangeProject(val) {
this.PageCurrentProject = val
this.searchTableDataProject()
},
fetchTableData1(row) {
this.projectCode = row.项目流水号
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.tableData1 = []
this.tableData2 = []
},
fetchTableData2(row) {
this.code = row.安全保证金流水号
this.SurplusAmount = row.应收回金额
this.projectName = row.项目名称
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
this.dialogFormVisible5 = true
},
handleSizeChange(val) {
this.PageCurrent = 1
this.PageSize = val
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.tableData1 = []
this.tableData2 = []
},
handleCurrentChange(val) {
this.PageCurrent = val
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.tableData1 = []
this.tableData2 = []
},
handleSizeChange2(val) {
this.PageCurrent2 = 1
this.PageSize2 = val
this.fetchTableData2()
},
handleCurrentChange2(val) {
this.PageCurrent2 = val
this.fetchTableData2()
},
addSafetyMargin(row) {
this.title = '新增安全保证金'
this.timetime = row.合同签订日期
this.changeTime()
this.dialogFormVisible1 = true
this.projectCode = row.项目流水号
this.addForm('form')
},
editSafetyMargin(row) {
this.editForm(row, 'form')
this.title = '编辑安全保证金'
this.dialogFormVisible1 = true
this.form.保证金金额 = row.保证金金额
this.form.交付日期 = row.交付日期
this.form.收回条件 = parseInt(row.执行进度流水号)
this.form.提前X天提醒我 = row.提前x天提醒
this.form.备注 = row.备注
this.code = row.安全保证金流水号
this.projectCode = row.项目流水号
},
addTableData1() {
addSafetyMargin(this.projectCode, this.form.保证金金额, this.form.交付日期, this.form.提前X天提醒我, this.form.收回条件, this.form.备注).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('添加成功')
this.title = ''
this.searchTableDataProject()
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.tableData2 = []
} else {
this.$message.error('添加失败')
}
})
},
editTableData1() {
editSafetyMargin(this.projectCode, this.form.保证金金额, this.form.交付日期, this.form.提前X天提醒我, this.form.收回条件, this.form.备注, this.code).then(response => {
this.dialogFormVisible1 = false
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.searchTableDataProject()
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.tableData2 = []
} else {
this.$message.error('信息更新失败')
}
})
},
// 提交保证金信息添加或者修改
submit1(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.flag1 === 1) {
this.addTableData1()
this.flag1 = null
} else if (this.flag1 === 2) {
this.editTableData1()
this.flag1 = null
} else if (this.flag1 === 3) {
this.addTableData2()
this.flag1 = null
} else if (this.flag1 === 4) {
this.edtTableData2()
this.flag1 = null
} else if (this.flag1 === 5) {
this.submitTakeBack()
this.flag1 = null
}
}
})
},
callOff() {
this.dialogFormVisible1 = false
this.dialogFormVisible2 = false
this.dialogFormVisible3 = false
this.dialogFormVisible4 = false
},
delSafetyMargin(row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
delSafetyMargin(row.安全保证金流水号, this.projectCode).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.searchTableDataProject()
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.tableData2 = []
} else {
this.$message.error('数据占用')
}
})
})
},
delWithdrawing(row) {
function a() {
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
this.dialogFormVisible2 = false
}
this.deleteRow(delWithdrawing, row.扣款流水号, a)
},
Withdrawing(row) {
this.title2 = '扣款'
this.timetime1 = row.交付日期
console.log(row)
this.changeTime1()
this.dialogFormVisible2 = true
this.code = row.安全保证金流水号
this.projectName = row.项目名称
this.maxMoney = parseFloat(row.应收回金额)
this.SurplusAmount = row.应收回金额
this.addForm('form2')
},
addTableData2() {
Withdrawing(this.code, this.form2.扣款金额, this.form2.被扣款人, this.form2.扣款原因, this.form2.扣款日期).then(response => {
this.dialogFormVisible2 = false
if (response.data[0].result === '1') {
this.$message.success('扣款成功')
this.title = ''
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
} else {
this.$message.error('扣款失败')
}
})
},
editWithdrawing(row) {
this.editForm(row, 'form3')
this.dialogFormVisible3 = true
this.maxMoney1 = parseFloat(this.SurplusAmount) + parseFloat(row.扣款金额)
this.form3.扣款金额 = row.扣款金额
this.form3.被扣款人 = row.被扣款人
this.form3.扣款原因 = row.扣款原因
this.form3.扣款日期 = row.扣款日期
this.WithdrawingCode = row.扣款流水号
},
edtTableData2() {
edtWithdrawing(this.WithdrawingCode, this.form3.扣款金额, this.form3.被扣款人, this.form3.扣款原因, this.form3.扣款日期).then(response => {
this.dialogFormVisible3 = false
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
} else {
this.$message.error('信息更新失败')
}
})
},
TakeBack(row) {
this.code = row.安全保证金流水号
this.projectName = row.项目名称
this.timetime2 = row.交付日期
this.changeTime2()
this.form4.剩余金额 = parseFloat(row.应收回金额)
this.dialogFormVisible4 = true
},
submitTakeBack() {
TakeBack(this.code, this.form4.收回日期).then(response => {
this.dialogFormVisible4 = false
if (response.data[0].result === '1') {
this.$message.success('信息更新成功')
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.projectCode], ['tableData1', 'total', 'tableData1Loading'])
} else {
this.$message.error('信息更新失败')
}
})
}
}
}
</script>
<style scoped>
.el-date-picker{
width:50px
}
</style>