添加营销系统模块
This commit is contained in:
586
src/views/MarketingCenter/BidBond/index.vue
Normal file
586
src/views/MarketingCenter/BidBond/index.vue
Normal file
@@ -0,0 +1,586 @@
|
||||
<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 style="margin-left: 20px">保金类型:</span>
|
||||
<el-select v-model="TypeOfGoldDepositValue" clearable filterable placeholder="请选择" size="small" style="margin-left: 10px;width: 130px">
|
||||
<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:100px" placeholder="请选择" readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 1" @clear="clear()"/>
|
||||
<span style="margin-left: 10px">招标企业:</span>
|
||||
<el-input v-model="TenderingEnterprise" clearable size="small" style="width:180px" placeholder="请输入招标企业"/>
|
||||
<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 = 10;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>
|
||||
<span>预警颜色说明:</span>
|
||||
<el-tag type="info">未到时间</el-tag>
|
||||
<el-tag type="warning">即将拖期</el-tag>
|
||||
<el-tag type="danger">已拖期</el-tag>
|
||||
<el-tag type="success">已收回</el-tag>
|
||||
<el-tag style="background-color: lightgrey;color: #666666">履约金</el-tag>
|
||||
</el-card>
|
||||
|
||||
<!--投标保证金表格-->
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="tableData1Loading"
|
||||
:row-style="tableRowClassName"
|
||||
:data="tableData1"
|
||||
style="width: 100%"
|
||||
height="600"
|
||||
border>
|
||||
<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">
|
||||
{{ 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="投标人" 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.投标日期 }}
|
||||
</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="120">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.状态 === '0'">未到预警时间</div>
|
||||
<div v-else-if="scope.row.状态 === '1'">即将拖期</div>
|
||||
<div v-else-if="scope.row.状态 === '2'">已拖期</div>
|
||||
<div v-else >已收回</div>
|
||||
</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="400">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="TakeBack(scope.row);flag1 = 1">收回</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="info"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="ComplianceGold(scope.row)">履约</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="editBidBond(scope.row);flag1 = 3">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click.stop="delBidBond(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 :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"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
<el-table :data="ListPeople" highlight-current-row height="400" 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.收回日期"
|
||||
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 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-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;" readonly @dblclick.native="dialogFormVisiblePeople = true;flag2 = 2" @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="计划收回日期" 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="提前X天提醒我" prop="提前X天提醒我">
|
||||
<el-input v-model="form2.提前X天提醒我" size="small" placeholder="提前X天提醒我" 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-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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initType, selectBidBond, getTree, tree, getTablePeople, TakeBack, ComplianceGold, addBidBond, editBidBond, delBidBond } from '@/api/MarketingCenter/BidBond'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
disabled: 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: '1',
|
||||
tableData1: [],
|
||||
PageSize: 10,
|
||||
PageCurrent: 1,
|
||||
total: null,
|
||||
dataPeople: [],
|
||||
dialogFormVisiblePeople: false,
|
||||
ListPeople: [],
|
||||
peopleid: '',
|
||||
peoplename: '',
|
||||
dialogFormVisible1: false,
|
||||
form1: {
|
||||
收回日期: ''
|
||||
},
|
||||
form2: {
|
||||
招标企业: '',
|
||||
联系人: '',
|
||||
联系电话: '',
|
||||
保证金金额: '',
|
||||
保证金类型: '',
|
||||
投标人: '',
|
||||
投标日期: '',
|
||||
计划收回日期: '',
|
||||
提前X天提醒我: '',
|
||||
备注: ''
|
||||
},
|
||||
rules1: { // 表单验证规则
|
||||
收回日期: [{ 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()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'TypeOfGoldDeposit')
|
||||
this.getSelect(initType, ['保证金类型', '保证金类型流水号'], 'TypeOfGoldDeposit1')
|
||||
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
|
||||
}
|
||||
if (this.radio === '1') {
|
||||
this.disabled = false
|
||||
} else {
|
||||
this.disabled = true
|
||||
}
|
||||
this.tableData1Loading = true
|
||||
selectBidBond(1, this.radio, 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].履约金 === '1' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
if (this.radio === '2') {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].是否禁用 = true
|
||||
}
|
||||
}
|
||||
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()
|
||||
},
|
||||
tableRowClassName({ row }) {
|
||||
if (parseInt(row.是否收回) === 2) {
|
||||
return 'background: #66cc33'
|
||||
} else {
|
||||
if (parseInt(row.履约金) === 1) {
|
||||
return 'background: lightgrey'
|
||||
}
|
||||
if (parseInt(row.状态) === 1) {
|
||||
return 'background: #ffff66'
|
||||
} else if (parseInt(row.状态) === 2) {
|
||||
return 'background: #ff6666'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
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.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
|
||||
},
|
||||
ComplianceGold(row) {
|
||||
this.$confirm('此操作会将此投标保证金转为履约保证金, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
ComplianceGold(row.招标保证金流水号).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.fetchTableData1()
|
||||
this.$message.success('删除成功')
|
||||
} else {
|
||||
this.$message.error('删除失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
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.备注, this.form2.提前X天提醒我).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.title = ''
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
editBidBond(row) {
|
||||
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.备注, this.form2.提前X天提醒我, this.BidBondCode).then(response => {
|
||||
this.dialogFormVisible2 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.title = ''
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
delBidBond(row) {
|
||||
function a() {
|
||||
this.fetchTableData1()
|
||||
this.dialogFormVisible2 = false
|
||||
}
|
||||
this.deleteRow(delBidBond, row.招标保证金流水号, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
573
src/views/MarketingCenter/CRM/index.vue
Normal file
573
src/views/MarketingCenter/CRM/index.vue
Normal file
@@ -0,0 +1,573 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>客户名称:</span>
|
||||
<el-select v-model="CustomerNameValue" filterable placeholder="请输入客户名称" style="margin-right: 10px" 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" @click="selectCustomerOfName">查询</el-button>
|
||||
</el-card>
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="loading1"
|
||||
ref="multipleTable"
|
||||
:data="tableData1"
|
||||
stripe
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
height="730"
|
||||
highlight-current-row
|
||||
border>
|
||||
<el-table-column align="center" label="序号" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-radio :label="scope.row.省份流水号" v-model="radio" @change.native="getCurrentRow(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>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-card>
|
||||
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click="addMarketingManager();flag = 1">添加销售经理</el-button>
|
||||
<span style="float: right">销售经理</span>
|
||||
<el-table v-loading="loading3" :data="tableData3" height="192" style="width: 100%;margin-top: 10px" border highlight-current-row>
|
||||
<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-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="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEditMarketingManager(scope.row);flag = 2">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDeleteMarketingManager(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-button type="text" icon="el-icon-circle-plus-outline" size="mini" @click = "addCustomer();flag1 = 1">新增客户</el-button>
|
||||
<span style="float: right">客户信息</span>
|
||||
<el-table v-loading="loading2" :data="tableData2" height="400" style="width: 100%;margin-top: 10px" border highlight-current-row>
|
||||
<el-table-column label="省份" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.省份 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户名称" align="center" width="280">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.客户名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" width="100spx">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.联系人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" align="center" width="192px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电话 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="传真" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.传真 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系地址" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.地址 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="电子邮箱" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.电子邮箱 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="税号" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.税号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="银行账号" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.银行账号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="信誉等级" align="center" width="100px">
|
||||
<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="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleEdit(scope.row);flag1 = 2">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</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="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"
|
||||
node-key="id"
|
||||
style="width: 150px;float: left"
|
||||
height="400"
|
||||
accordion
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
<el-table :data="ListPeople" highlight-current-row height="400" 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 :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="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true"/>
|
||||
</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-row>
|
||||
<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.省份" :disabled="true" clearable size="small" style="width:200px" placeholder="请选择省份"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</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 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 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 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 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 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 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 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 ref="form2" :model="form2" :rules="rules2" label-position="left" label-width="90px" class="demo-ruleForm" style="margin: auto">
|
||||
<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-form>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<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:530px" placeholder="请输入备注"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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 { searchValue, selectAdress, selectCustomer, getTree, tree, getTablePeople, selectMarketingManager, selectCustomerOfName, initCustomer, deleteCustomer, deleteMarketingManager, addMarketingManager, editMarketingManager, addCustomer, selectAdressOfID, editCustomer } from '@/api/MarketingCenter/CRM'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
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: 10,
|
||||
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')
|
||||
},
|
||||
getCurrentRow(row) {
|
||||
this.CustomerNameValue = ''
|
||||
this.AdressID = row
|
||||
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
|
||||
})
|
||||
},
|
||||
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'])
|
||||
},
|
||||
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(data).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
})
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
function a() {
|
||||
if (this.CustomerNameValue === '') {
|
||||
this.getTable(selectCustomer, [this.AdressID, this.pageCurrent, this.pageSize], ['tableData2', 'total', 'loading2'])
|
||||
}
|
||||
if (this.CustomerNameValue !== '') {
|
||||
selectCustomerOfName(row.客户流水号, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData2 = response.data.rows
|
||||
})
|
||||
}
|
||||
}
|
||||
this.deleteRow(deleteCustomer, row.客户流水号, a)
|
||||
},
|
||||
handleDeleteMarketingManager(index, row) {
|
||||
function a() {
|
||||
selectMarketingManager(this.AdressID).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
this.deleteRow(deleteMarketingManager, row.营销经理地区流水号, a)
|
||||
},
|
||||
addMarketingManager() {
|
||||
if (this.AdressID === '' || this.AdressID === null) {
|
||||
this.$message.warning('请选择一个省份')
|
||||
} else {
|
||||
this.dialogFormVisible1 = true
|
||||
this.title1 = '增加'
|
||||
this.addForm('form1')
|
||||
}
|
||||
},
|
||||
callOff1() {
|
||||
this.dialogFormVisible1 = false
|
||||
},
|
||||
submit1() {
|
||||
function a() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.loading3 = true
|
||||
selectMarketingManager(this.AdressID).then(response => {
|
||||
this.loading3 = false
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
}
|
||||
if (this.flag === 1) {
|
||||
this.addTable(addMarketingManager, [this.peopleid, this.AdressID], 'form1', a)
|
||||
} else {
|
||||
this.editTable(editMarketingManager, [this.peopleid, this.a], 'form1', a)
|
||||
}
|
||||
},
|
||||
handleEditMarketingManager(row) {
|
||||
this.dialogFormVisible1 = true
|
||||
this.title1 = '编辑'
|
||||
this.form1.营销经理 = row.姓名
|
||||
this.peopleid = row.营销经理流水号
|
||||
this.a = row.营销经理地区流水号
|
||||
},
|
||||
addCustomer() {
|
||||
if (this.AdressID === '' || this.AdressID === null) {
|
||||
this.$message.warning('请选择一个省份')
|
||||
} else {
|
||||
this.dialogFormVisible2 = true
|
||||
this.title2 = '增加'
|
||||
this.addForm('form2')
|
||||
}
|
||||
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.客户流水号
|
||||
},
|
||||
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.备注], '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], 'form2', a)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-input{
|
||||
width: 200px;
|
||||
}
|
||||
.el-select{
|
||||
width: 200px;
|
||||
}
|
||||
.move{
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
1462
src/views/MarketingCenter/ContractCapitalManagement/index.vue
Normal file
1462
src/views/MarketingCenter/ContractCapitalManagement/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,821 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<span>项目名称</span>
|
||||
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称" style="margin-right: 10px" 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="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="openName();param = 1" @clear="clear()"/>
|
||||
<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>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="tableData1"
|
||||
:row-key="getRowKeys"
|
||||
:expand-row-keys="expands"
|
||||
style="width: 100%"
|
||||
height="600"
|
||||
border
|
||||
@row-click="fetchExecutionProgressdata"
|
||||
@expand-change="selectMachine">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="scope">
|
||||
<el-table :data="tableData2" border style="width: 600px; text-align: center">
|
||||
<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="操作" fixed="right" width="250px" 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">
|
||||
{{ 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="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 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="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="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="操作" fixed="right" align="center" width="300">
|
||||
<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-card v-show="ExecutionProgressShow">
|
||||
<h4>合同进度</h4>
|
||||
<el-steps :active="ExecutionProgress" finish-status="success" process-status="process " style="margin-left: 10px">
|
||||
<el-step title="签订合同" icon="el-icon-edit-outline"/>
|
||||
<el-step title="图纸会签" icon="el-icon-picture-outline"/>
|
||||
<el-step title="加工制造" icon="el-icon-setting"/>
|
||||
<el-step title="预备验收" icon="el-icon-view"/>
|
||||
<el-step title="设备发货" icon="el-icon-sold-out"/>
|
||||
<el-step title="安装调试" icon="el-icon-time"/>
|
||||
<el-step title="项目验收" icon="el-icon-circle-check-outline"/>
|
||||
</el-steps>
|
||||
</el-card>
|
||||
<el-card v-show="uploader" style="min-height: 145px;">
|
||||
<h4>纪要文件</h4>
|
||||
<div style="float: right;">
|
||||
<el-upload
|
||||
:action="action"
|
||||
:on-success="uploadSuccess"
|
||||
:on-error="uploadFailure"
|
||||
:show-file-list="showFileList"
|
||||
:file-list="fileList"
|
||||
class="upload-demo"
|
||||
multiple>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<div v-for="file in hadFile" :key="file.id">
|
||||
<div class="wrapper">
|
||||
<div class="content">
|
||||
<div class="action">
|
||||
<a class="delete" @click="deleteFileData(file.id)">删除</a>
|
||||
</div>
|
||||
<div v-if="file.suffix==='pdf'" class="icon"><svg-icon icon-class="pdf" /></div>
|
||||
<div v-else-if="file.suffix==='docx'||file.suffix === 'doc'" class="icon"><svg-icon icon-class="doc" /></div>
|
||||
<div v-else-if="file.suffix==='xlsx' || file.suffix === 'xls'" class="icon"><svg-icon icon-class="excel" /></div>
|
||||
<div v-else-if="file.suffix==='pptx' || file.suffix === 'ppt'" class="icon"><svg-icon icon-class="ppt" /></div>
|
||||
<div v-else-if="file.suffix==='jpg' || file.suffix === 'jpeg'|| file.suffix === 'png'" class="icon"><svg-icon icon-class="pic" /></div>
|
||||
<div v-else class="icon"><svg-icon icon-class="file" /></div>
|
||||
<a :href="file.url"><div class="info">{{ file.name }}</div></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<!--新增合同信息对话框-->
|
||||
<el-dialog :title="title" :visible.sync="dialogFormVisible1" center style="min-height: 300px" width="800px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="140px" class="demo-ruleForm">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<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="12">
|
||||
<el-form-item label="已完成进度" prop="executionProgressID">
|
||||
<el-select v-model="form.executionProgressID" :disabled="infoDisable" placeholder="请输入目前执行进度" clearable size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in executionProgress"
|
||||
: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="MarketingManagerValue">
|
||||
<el-input v-model="form.MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="openName()" @clear="clear()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="图纸会签节点" prop="drawingJointSignNode">
|
||||
<el-date-picker
|
||||
v-model="form.drawingJointSignNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择图纸会签节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备预验节点" prop="EquipmentPreAcceptanceNode">
|
||||
<el-date-picker
|
||||
v-model="form.EquipmentPreAcceptanceNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择设备预验收节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发货节点" prop="ConsignmentNode">
|
||||
<el-date-picker
|
||||
v-model="form.ConsignmentNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择发货节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="安装调试节点" prop="installDebugNode">
|
||||
<el-date-picker
|
||||
v-model="form.installDebugNode"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
type="date"
|
||||
placeholder="请选择安装调试节点"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="form.customerName" size="small" placeholder="请输入客户名称" style="width:200px" readonly @dblclick.native="CustomerChange()"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="付款方式" prop="付款方式">
|
||||
<el-select v-model="form.付款方式" :disabled="disabled" placeholder="请选择付款方式" clearable size="small" style="width: 200px">
|
||||
<el-option
|
||||
v-for="item in money"
|
||||
: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="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="25%">
|
||||
<el-form ref="form1" :model="form1" :rules="rules1" label-width="140px">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<!--营销经理选择-->
|
||||
<el-dialog :visible.sync="dialogFormVisiblePeople" title="营销经理" center width="30%">
|
||||
<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: 15px">
|
||||
<el-table :data="tableData3" border 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 :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 = 10;PageCurrent1 = 1;fetchCustomerData()">查询</el-button>
|
||||
<el-table v-loading="loading1" :data="CustomerData" highlight-current-row height="300" show-overflow-tooltip style="height: 330px; margin-top: 20px" @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" >
|
||||
<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="10"
|
||||
:total="total1"
|
||||
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 { initProject, searchTable1, fetchExecutionProgress, delList, addList, executionProgressID, editchar, getTree, tree, getTablePeople, fetchCustomerData, getFileData, deleteFileData, selectMachine, selectProvince, SelectMarketingManager, submitMachine, editMachine, delMachine, money } from '@/api/MarketingCenter/ContractInformationManagement'
|
||||
import { upload, download } from '@/utils/request'
|
||||
export default {
|
||||
|
||||
data() {
|
||||
return {
|
||||
a: 1,
|
||||
b: 1,
|
||||
c: 1,
|
||||
money: [],
|
||||
expands: [],
|
||||
flag: '',
|
||||
title1: '',
|
||||
dialogFormVisible2: false,
|
||||
ProvinceValue: '',
|
||||
Province: [],
|
||||
CustomerCode: '',
|
||||
loading1: false,
|
||||
CustomerData: [],
|
||||
Customer: '',
|
||||
id1: '',
|
||||
action: '',
|
||||
peoplename: '',
|
||||
peopleid: '',
|
||||
dataPeople: [],
|
||||
ListPeople: [],
|
||||
fileList: [],
|
||||
hadFile: [],
|
||||
disabled: false,
|
||||
projectNum: null,
|
||||
dialogFormVisiblePeople: false,
|
||||
dialogFormVisiblePeople1: false,
|
||||
dialogCustomerFormVisible: false,
|
||||
listLoading: false,
|
||||
showFileList: true,
|
||||
entryNameValue: '', // 项目名称下拉框
|
||||
entryName: [], // 项目名称下拉框数据
|
||||
list1: [], // 项目名称临时存储
|
||||
MarketingManagerValue: '', // 营销经理下拉框
|
||||
MarketingManager: [], // 营销经理下拉框数据
|
||||
list2: [], // 营销经理临时存储
|
||||
tableData1: [], // 合同信息表
|
||||
tableData2: [], // 机床信息表
|
||||
tableData3: [], // 营销经理表
|
||||
PageCurrent: 1,
|
||||
PageSize: 10,
|
||||
total: null,
|
||||
PageCurrent1: 1,
|
||||
PageSize1: 10,
|
||||
total1: null,
|
||||
infoDisable: true,
|
||||
hetongID: '',
|
||||
ExecutionProgress: null, // 执行进度
|
||||
ExecutionProgressShow: false, // 执行进度可见性
|
||||
uploader: false, // 上传可见性
|
||||
dialogFormVisible1: false, // 新增对话框可见性
|
||||
form: {
|
||||
MarketingManagerValue: '',
|
||||
EntryName: '', // 项目名称
|
||||
drawingJointSignNode: '', // 图纸会签节点
|
||||
EquipmentPreAcceptanceNode: '', // 设备预验收节点
|
||||
ConsignmentNode: '', // 发货节点
|
||||
installDebugNode: '', // 安装调试节点
|
||||
executionProgressID: 1, // 执行进度ID
|
||||
customerName: '', // 客户名称
|
||||
remark: '',
|
||||
付款方式: 1
|
||||
},
|
||||
form1: {
|
||||
设备型号: '',
|
||||
设备名称: ''
|
||||
},
|
||||
title: '',
|
||||
param: 0,
|
||||
executionProgress: [], // 执行进度下拉框数据
|
||||
executionProgressID1: '', // 中间变量存储执行进度ID
|
||||
ProjectTypeIDV: [],
|
||||
temp: '', // 增加或修改的标志位
|
||||
rules: { // 表单验证规则
|
||||
EntryName: [{ required: true, message: '请输入项目名称', trigger: 'blur' }],
|
||||
MarketingManagerValue: [{ required: true, message: '请选择营销经理', trigger: 'change' }],
|
||||
executionProgressID: [{ required: true, message: '请选择已完成进度', trigger: 'change' }],
|
||||
付款方式: [{ required: true, message: '请选择付款方式', trigger: 'change' }]
|
||||
},
|
||||
rules1: { // 表单验证规则
|
||||
设备型号: [{ required: true, message: '请输入设备型号', trigger: 'blur' }],
|
||||
设备名称: [{ required: true, message: '请输入设备名称', trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.fetchTableData1()
|
||||
this.fetchCustomerData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
getTree().then(response => { // 获取人员信息树
|
||||
const data = response.data
|
||||
this.dataPeople = tree(data, 0)
|
||||
})
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(executionProgressID, ['执行进度名', '执行进度ID'], 'executionProgress')
|
||||
this.getSelect(selectProvince, ['省份', '省份流水号'], 'Province')
|
||||
this.getSelect(money, ['付款方式', '付款方式代码'], 'money')
|
||||
},
|
||||
openName() {
|
||||
this.dialogFormVisiblePeople = true
|
||||
},
|
||||
getRowKeys(row) {
|
||||
return row.项目流水号
|
||||
},
|
||||
handleNodeClick(data) { // 树节点点击
|
||||
getTablePeople(data.id).then(response => {
|
||||
this.ListPeople = response.data
|
||||
})
|
||||
},
|
||||
handleChange(row) {
|
||||
this.peopleid = row.营销经理流水号
|
||||
this.peoplename = row.姓名
|
||||
},
|
||||
getName() {
|
||||
if (this.param === 1) {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.MarketingManagerValue = this.peoplename
|
||||
this.param = 0
|
||||
} else {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.id1 = this.peopleid
|
||||
this.form.MarketingManagerValue = this.peoplename
|
||||
}
|
||||
},
|
||||
offName() {
|
||||
this.dialogFormVisiblePeople = false
|
||||
this.dialogFormVisiblePeople1 = false
|
||||
this.peopleid = ''
|
||||
this.peoplename = ''
|
||||
},
|
||||
fetchTableData1() {
|
||||
this.ExecutionProgressShow = false
|
||||
this.uploader = false
|
||||
this.ExecutionProgress = null
|
||||
this.listLoading = true
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.peopleid], ['tableData1', 'total', 'listLoading'])
|
||||
},
|
||||
fetchExecutionProgressdata(row) {
|
||||
this.projectNum = row.项目流水号
|
||||
this.ExecutionProgressShow = true
|
||||
this.uploader = true
|
||||
this.action = `${upload}?&ProjectNum=${this.projectNum}`
|
||||
this.getFileData(this.projectNum)
|
||||
fetchExecutionProgress(row.项目流水号).then(response => {
|
||||
this.ExecutionProgress = response.data[0].执行进度流水号
|
||||
})
|
||||
},
|
||||
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.项目流水号
|
||||
}
|
||||
}
|
||||
this.projectNum = row.项目流水号
|
||||
this.ExecutionProgressShow = true
|
||||
this.uploader = true
|
||||
this.action = `${upload}?&ProjectNum=${this.projectNum}`
|
||||
this.getFileData(this.projectNum)
|
||||
fetchExecutionProgress(row.项目流水号).then(response => {
|
||||
this.ExecutionProgress = response.data[0].执行进度流水号
|
||||
})
|
||||
selectMachine(row.项目流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
},
|
||||
handleDelete(row) {
|
||||
this.deleteRow(delList, row.项目流水号, function() { this.fetchTableData1() })
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.fetchTableData1()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.fetchTableData1()
|
||||
},
|
||||
handleSizeChange1(val) {
|
||||
this.PageCurrent1 = 1
|
||||
this.PageSize1 = val
|
||||
this.fetchCustomerData()
|
||||
},
|
||||
handleCurrentChange1(val) {
|
||||
this.PageCurrent1 = val
|
||||
this.fetchCustomerData()
|
||||
},
|
||||
ADD() {
|
||||
this.addForm('form')
|
||||
this.dialogFormVisible1 = true
|
||||
this.temp = 1
|
||||
this.title = '增加'
|
||||
this.disabled = false
|
||||
},
|
||||
addTableData1() {
|
||||
addList(this.form.EntryName, this.form.drawingJointSignNode, this.form.EquipmentPreAcceptanceNode, this.form.ConsignmentNode, this.form.installDebugNode, this.id1, this.form.executionProgressID, this.CustomerCode, this.form.remark, this.form.付款方式).then(response => {
|
||||
this.dialogFormVisible1 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.peopleid = ''
|
||||
this.title = ''
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, '', ''], ['tableData1', 'total', 'listLoading'])
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 重置表单
|
||||
callOff() {
|
||||
this.dialogFormVisible1 = false
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
|
||||
// 提交添加或者修改
|
||||
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
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible1 = true
|
||||
this.form.contractNumber = row.合同编号
|
||||
this.form.EntryName = row.项目名称
|
||||
this.form.drawingJointSignNode = row.图纸会签节点
|
||||
this.form.EquipmentPreAcceptanceNode = row.设备预验收节点
|
||||
this.form.ConsignmentNode = row.发货节点
|
||||
this.form.installDebugNode = row.安装调试节点
|
||||
this.form.MarketingManagerValue = row.营销经理
|
||||
this.form.executionProgressID = parseInt(row.执行进度流水号)
|
||||
this.form.customerName = row.客户名称
|
||||
this.hetongID = row.项目流水号
|
||||
this.form.remark = row.合同信息备注
|
||||
this.CustomerCode = row.客户流水号
|
||||
this.form.付款方式 = parseInt(row.付款方式代码)
|
||||
this.disabled = true
|
||||
this.temp = 2
|
||||
this.infoDisable = false
|
||||
},
|
||||
chaEdit() {
|
||||
editchar(this.form.EntryName, this.form.drawingJointSignNode, this.form.EquipmentPreAcceptanceNode, this.form.ConsignmentNode, this.form.installDebugNode, this.id1, this.form.executionProgressID, this.CustomerCode, this.form.remark, this.hetongID, this.form.付款方式).then(response => {
|
||||
this.dialogFormVisible1 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息更新成功')
|
||||
this.peopleid = ''
|
||||
this.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, '', ''], ['tableData1', 'total', 'listLoading'])
|
||||
this.ExecutionProgressShow = true
|
||||
this.uploader = true
|
||||
this.action = `${upload}?&ProjectNum=${this.hetongID}`
|
||||
fetchExecutionProgress(this.hetongID).then(response => {
|
||||
this.ExecutionProgress = response.data[0].执行进度流水号
|
||||
})
|
||||
},
|
||||
clear() {
|
||||
this.peopleid = ''
|
||||
this.tableData3 = []
|
||||
this.ProvinceValue = ''
|
||||
},
|
||||
CustomerChange() {
|
||||
this.dialogCustomerFormVisible = true
|
||||
},
|
||||
offCustomerChange() {
|
||||
this.dialogCustomerFormVisible = false
|
||||
},
|
||||
fetchCustomerData() {
|
||||
this.loading1 = true
|
||||
this.getTable(fetchCustomerData, [this.PageCurrent1, this.PageSize1, this.Customer], ['CustomerData', 'total1', 'loading1'])
|
||||
},
|
||||
handleCustomerChange(row) {
|
||||
this.CustomerCode = row.客户流水号
|
||||
this.form.customerName = row.客户名称
|
||||
},
|
||||
getCustomerCode() {
|
||||
this.dialogCustomerFormVisible = false
|
||||
},
|
||||
async submitUpload() {
|
||||
await this.$refs.upload.submit()
|
||||
},
|
||||
uploadSuccess(res, file, fileList) {
|
||||
if (res[0].result === '1') {
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
} else {
|
||||
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
|
||||
}
|
||||
if (fileList.length === 0) {
|
||||
this.$message.success('文件上传成功')
|
||||
this.getFileData(this.projectNum)
|
||||
}
|
||||
},
|
||||
uploadFailure(a, file, fileList) {
|
||||
fileList.map(file => {
|
||||
this.$message.error(`${file.name}文件上传失败,请检查上传文件是否正确!`)
|
||||
})
|
||||
},
|
||||
getFileData(row) {
|
||||
this.hadFile = []
|
||||
getFileData(row).then(res => {
|
||||
if (res.data.length > 0) {
|
||||
res.data.map(item => {
|
||||
this.hadFile.push({
|
||||
url: `${download}?id=${item.文件标识}.${item.文件后缀}&name=${item.文件名称}.${item.文件后缀}`,
|
||||
name: `${item.文件名称}.${item.文件后缀}`,
|
||||
suffix: item.文件后缀,
|
||||
id: item.文件标识
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteFileData(id) {
|
||||
this.deleteRow(deleteFileData, id, function() { this.getFileData(this.projectNum) })
|
||||
},
|
||||
changeProvince() {
|
||||
SelectMarketingManager(this.ProvinceValue).then(response => {
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
},
|
||||
addMachine(row) {
|
||||
this.projectNum = row.项目流水号
|
||||
this.dialogFormVisible2 = true
|
||||
this.title1 = '新增'
|
||||
this.addForm('form1')
|
||||
},
|
||||
editMachine(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
this.title1 = '编辑'
|
||||
this.c = row.机床流水号
|
||||
this.form1.设备型号 = row.机床图号
|
||||
this.form1.设备名称 = row.机床名称
|
||||
},
|
||||
callOff2() {
|
||||
this.dialogFormVisible2 = false
|
||||
},
|
||||
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.设备名称], 'form1', a)
|
||||
} else {
|
||||
this.editTable(editMachine, [this.c, this.form1.设备型号, this.form1.设备名称], 'form1', a)
|
||||
}
|
||||
},
|
||||
deleteMachine(row) {
|
||||
function a() {
|
||||
selectMachine(this.projectNum).then(response => {
|
||||
this.tableData2 = response.data
|
||||
})
|
||||
}
|
||||
this.deleteRow(delMachine, row.机床流水号, a)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-card {
|
||||
margin-top: 15px;
|
||||
}
|
||||
.el-date-editor{
|
||||
width:200px;
|
||||
}
|
||||
|
||||
.wrapper{
|
||||
width: 260px;
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #b8c7d9;
|
||||
float: left;
|
||||
margin: 10px;
|
||||
}
|
||||
.content{
|
||||
position: relative;
|
||||
padding: 8px 8px 0 8px;
|
||||
}
|
||||
.action{
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 8px;
|
||||
}
|
||||
.delete{
|
||||
padding: 0 5px;
|
||||
border-radius: 3px;
|
||||
color: #0f84b0;
|
||||
font-size: 12px;
|
||||
}
|
||||
.delete:hover{
|
||||
background: -webkit-linear-gradient(top,#0ba9e3,#0099d3);
|
||||
color: #fff;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
.icon{
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: inline-block;
|
||||
margin-right: 7px;
|
||||
margin-top: 2px;
|
||||
font-size: 26px;
|
||||
}
|
||||
.info{
|
||||
position: absolute;
|
||||
left: 44px;
|
||||
line-height: 30px;
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
}
|
||||
</style>
|
||||
668
src/views/MarketingCenter/SafetyMargin/index.vue
Normal file
668
src/views/MarketingCenter/SafetyMargin/index.vue
Normal file
@@ -0,0 +1,668 @@
|
||||
<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 style="margin-left: 20px">项目名称:</span>
|
||||
<el-select v-model="entryNameValue" clearable filterable placeholder="项目名称:" size="small" style="margin-left: 10px">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<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;margin-right: 15px" @click="addSafetyMargin();flag1 = 1">增加</el-button>
|
||||
<span>预警颜色说明:</span>
|
||||
<el-tag type="info">未到时间</el-tag>
|
||||
<el-tag type="warning">即将拖期</el-tag>
|
||||
<el-tag type="danger">已拖期</el-tag>
|
||||
<el-tag type="success">已收回</el-tag>
|
||||
</el-card>
|
||||
|
||||
<!--安全保证金表格-->
|
||||
<el-card>
|
||||
<el-table
|
||||
v-loading="tableData1Loading"
|
||||
:row-style="tableRowClassName"
|
||||
:data="tableData1"
|
||||
style="width: 100%"
|
||||
height="400"
|
||||
border
|
||||
@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">
|
||||
{{ 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 :label="AmountReceivable" align="center" 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.实际收回日期 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态" width="120">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.状态 === '0'">未到预警时间</div>
|
||||
<div v-else-if="scope.row.状态 === '1'">即将拖期</div>
|
||||
<div v-else-if="scope.row.状态 === '2'">已拖期</div>
|
||||
<div v-else >已收回</div>
|
||||
</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="400">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="TakeBack(scope.row);flag1 = 5">收回</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="info"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="Withdrawing(scope.row);flag1 = 3">扣款</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="editSafetyMargin(scope.row);flag1 = 2">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click.stop="delSafetyMargin(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-card>
|
||||
<span style="float: right">扣款记录</span>
|
||||
<el-table
|
||||
v-loading="tableData2Loading"
|
||||
:data="tableData2"
|
||||
style="width: 100%;margin-top: 15px"
|
||||
height="230"
|
||||
border>
|
||||
<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="primary"
|
||||
icon="el-icon-edit"
|
||||
@click.stop="editWithdrawing(scope.row);flag1 = 4">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="disabled"
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click.stop="delWithdrawing(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block" style="margin-top: 10px;">
|
||||
<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 :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-select v-model="form.项目名称" clearable filterable placeholder="请选择项目:" size="small">
|
||||
<el-option
|
||||
v-for="item in entryName1"
|
||||
: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="form.保证金金额" 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.交付日期"
|
||||
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-date-picker
|
||||
v-model="form.预计收回日期"
|
||||
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 v-model="form.提前X天提醒我" size="small" placeholder="提前X天提醒我" style="width:200px"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="备注">
|
||||
<el-input v-model="form.备注" 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('form')">取消</el-button>
|
||||
<el-button type="primary" @click="submit1('form')">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!--扣款记录增加-->
|
||||
<el-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.扣款日期"
|
||||
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 :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.扣款日期"
|
||||
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 :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.收回日期"
|
||||
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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, searchTable1, searchTable2, addSafetyMargin, editSafetyMargin, delSafetyMargin, Withdrawing, delWithdrawing, edtWithdrawing, TakeBack } from '@/api/MarketingCenter/SafetyMargin'
|
||||
export default {
|
||||
data() {
|
||||
const validateValue = (rule, value, callback) => {
|
||||
if (value === 0) {
|
||||
callback(new Error('金额不能为0或大于剩余保证金金额'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
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: 10,
|
||||
total: null,
|
||||
PageCurrent2: 1,
|
||||
PageSize2: 10,
|
||||
total2: null,
|
||||
radio: '1',
|
||||
title: '',
|
||||
title2: '',
|
||||
entryName1: [],
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
dialogFormVisible3: false,
|
||||
dialogFormVisible4: false,
|
||||
form: {
|
||||
备注: '',
|
||||
项目名称: '',
|
||||
保证金金额: '',
|
||||
交付日期: '',
|
||||
预计收回日期: '',
|
||||
提前X天提醒我: ''
|
||||
},
|
||||
form2: {
|
||||
扣款金额: '',
|
||||
被扣款人: '',
|
||||
扣款日期: '',
|
||||
扣款原因: ''
|
||||
},
|
||||
form3: {
|
||||
扣款金额: '',
|
||||
被扣款人: '',
|
||||
扣款日期: '',
|
||||
扣款原因: ''
|
||||
},
|
||||
form4: {
|
||||
收回日期: '',
|
||||
剩余金额: ''
|
||||
},
|
||||
rules1: { // 表单验证规则
|
||||
项目名称: [{ required: true, message: '请选择项目', trigger: 'change' }],
|
||||
保证金金额: [{ required: true, message: '请输入保证金金额', trigger: 'blur' }],
|
||||
交付日期: [{ 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()
|
||||
},
|
||||
methods: {
|
||||
change(data) {
|
||||
return data + 1
|
||||
},
|
||||
init() {
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName')
|
||||
this.getSelect(initProject, ['项目名称', '项目流水号'], 'entryName1')
|
||||
},
|
||||
fetchTableData1() {
|
||||
if (this.radio === '1') {
|
||||
this.disabled = false
|
||||
this.AmountReceivable = '应收回金额'
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.radio], ['tableData1', 'total', 'tableData1Loading'])
|
||||
} else {
|
||||
this.disabled = true
|
||||
this.AmountReceivable = '实收回金额'
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.radio], ['tableData1', 'total', 'tableData1Loading'])
|
||||
}
|
||||
},
|
||||
fetchTableData2(row) {
|
||||
this.code = row.安全保证金流水号
|
||||
this.SurplusAmount = row.应收回金额
|
||||
this.projectName = row.项目名称
|
||||
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.PageCurrent = 1
|
||||
this.PageSize = val
|
||||
this.fetchTableData1()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.PageCurrent = val
|
||||
this.fetchTableData1()
|
||||
},
|
||||
handleSizeChange2(val) {
|
||||
this.PageCurrent2 = 1
|
||||
this.PageSize2 = val
|
||||
this.fetchTableData2()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.PageCurrent2 = val
|
||||
this.fetchTableData2()
|
||||
},
|
||||
tableRowClassName({ row }) {
|
||||
if (parseInt(row.是否收回) === 2) {
|
||||
return 'background: #66cc33'
|
||||
} else {
|
||||
if (parseInt(row.状态) === 1) {
|
||||
return 'background: #ffff66'
|
||||
} else if (parseInt(row.状态) === 2) {
|
||||
return 'background: #ff6666'
|
||||
} else {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
},
|
||||
addSafetyMargin() {
|
||||
this.title = '增加'
|
||||
this.dialogFormVisible1 = true
|
||||
this.addForm('form')
|
||||
},
|
||||
editSafetyMargin(row) {
|
||||
this.title = '编辑'
|
||||
this.dialogFormVisible1 = true
|
||||
this.form.项目名称 = parseInt(row.项目流水号)
|
||||
this.form.保证金金额 = row.保证金金额
|
||||
this.form.交付日期 = row.交付日期
|
||||
this.form.预计收回日期 = row.预计收回日期
|
||||
this.form.提前X天提醒我 = row.提前x天提醒
|
||||
this.form.备注 = row.备注
|
||||
this.code = row.安全保证金流水号
|
||||
// this.projectCode = parseInt(row.项目流水号)
|
||||
},
|
||||
addTableData1() {
|
||||
addSafetyMargin(this.form.项目名称, 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.fetchTableData1()
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
editTableData1() {
|
||||
editSafetyMargin(this.form.项目名称, 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.fetchTableData1()
|
||||
this.code = ''
|
||||
this.projectCode = ''
|
||||
} 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
|
||||
},
|
||||
delSafetyMargin(row) {
|
||||
this.deleteRow(delSafetyMargin, row.安全保证金流水号, function() { this.fetchTableData1() })
|
||||
},
|
||||
delWithdrawing(row) {
|
||||
function a() {
|
||||
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
|
||||
this.getTable(searchTable1, [this.PageCurrent, this.PageSize, this.entryNameValue, this.radio], ['tableData1', 'total', 'tableData1Loading'])
|
||||
this.dialogFormVisible2 = false
|
||||
}
|
||||
this.deleteRow(delWithdrawing, row.扣款流水号, a)
|
||||
},
|
||||
Withdrawing(row) {
|
||||
this.title2 = '扣款'
|
||||
this.dialogFormVisible2 = true
|
||||
this.code = row.安全保证金流水号
|
||||
this.projectName = row.项目名称
|
||||
this.maxMoney = 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.entryNameValue, this.radio], ['tableData1', 'total', 'tableData1Loading'])
|
||||
this.getTable(searchTable2, [this.PageCurrent2, this.PageSize2, this.code], ['tableData2', 'total2', 'tableData2Loading'])
|
||||
} else {
|
||||
this.$message.error('扣款失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
editWithdrawing(row) {
|
||||
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.扣款流水号
|
||||
console.log(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.entryNameValue, this.radio], ['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.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.entryNameValue, this.radio], ['tableData1', 'total', 'tableData1Loading'])
|
||||
} else {
|
||||
this.$message.error('信息更新失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-date-picker{
|
||||
width:50px
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user