采购、装配
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span style="margin-left: 10px">销售经理</span>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-input v-model="MarketingManagerValue" clearable size="small" style="width:200px" placeholder="请选择营销经理" readonly @dblclick.native="dialogFormVisiblePeople = true" @clear="clear()"/>
|
||||
<el-button type="success" icon="el-icon-search" size="small" style="margin-left: 10px" @click="pageSize = 10;PageCurrent = 1;tableData2=[];getTableData()">查询收款计划</el-button>
|
||||
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" style="margin-left: 10px" @click="ADD()">新增收款计划</el-button>
|
||||
<el-badge :value="value" :max="99" class="item">
|
||||
@@ -119,6 +119,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<!--<el-button-->
|
||||
<!--size="mini"-->
|
||||
<!--type="primary"-->
|
||||
<!--icon="el-icon-tickets"-->
|
||||
<!--:disabled="scope.row.是否禁用"-->
|
||||
<!--@click.stop="handleEdit(scope.row, scope.$index)">付款</el-button>-->
|
||||
<el-button
|
||||
:disabled="scope.row.是否禁用编辑"
|
||||
size="mini"
|
||||
@@ -174,6 +180,11 @@
|
||||
{{ 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" align="center" width="250">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@@ -218,7 +229,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="提前X天提醒">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:80px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)" @blur="selectDay"/>
|
||||
<el-input v-model="scope.row.提前x天提醒" size="small" style="width:80px" placeholder="请输入提前X天提醒" @change="editDay(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="计划收款时间">
|
||||
@@ -269,7 +280,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible2" title="新增付款计划" center width="380px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" clearable filterable placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" @change="searchProjectName">
|
||||
<el-select v-model="form2.entryNameValue" placeholder="请输入项目名称" style="margin-left: 2px; width: 200px" size="small" clearable filterable @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
@@ -293,7 +304,7 @@
|
||||
<el-dialog :visible.sync="dialogFormVisible4" title="编辑付款计划" center width="400px">
|
||||
<el-form ref="form2" :model="form2" :rules="rules" label-position="left">
|
||||
<el-form-item label="项目名称" prop="entryNameValue" label-width="100px">
|
||||
<el-select v-model="form2.entryNameValue" :disabled="true" clearable filterable placeholder="请输入项目名称" style="width: 200px" size="small" @change="searchProjectName">
|
||||
<el-select v-model="form2.entryNameValue" :disabled="true" clearable placeholder="请输入项目名称" style="width: 200px" size="small" filterable @change="searchProjectName">
|
||||
<el-option
|
||||
v-for="item in entryName"
|
||||
:key="item.value"
|
||||
@@ -407,7 +418,7 @@
|
||||
<el-input-number v-model="form4.转移金额" :min="0" :max="max1" :precision="2" :step="1" controls-position="right" size="small" style="width: 200px" placeholder="请输入本次付款金额" @change="changeMoney"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划阶段" prop="计划阶段" label-width="110px">
|
||||
<el-select v-model="form4.计划阶段" clearable filterable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small">
|
||||
<el-select v-model="form4.计划阶段" clearable placeholder="请选择计划转移到某阶段" style="width: 200px" size="small" filterable>
|
||||
<el-option
|
||||
v-for="item in Planning"
|
||||
:key="item.value"
|
||||
@@ -473,7 +484,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api/MarketingCenter/ContractCapitalManagement'
|
||||
import { SelectContractFunds, AccountsReceivable, editDay, TransPlanning, selectBatch, editList, delMoney, editTime, selectMax, editFukuan, fukuan, selectProvince, SelectMarketingManager, searchTable1, searchTable2, editBatchCapitalChar, deletechar, searchProjectNumber, searchProjectName, addList, PaymentPhase, dellist, selectMachine, selectBatchFundingDetails } from '@/api//MarketingCenter/ContractCapitalManagement'
|
||||
export default {
|
||||
data() {
|
||||
const validateValue = (rule, value, callback) => {
|
||||
@@ -582,10 +593,10 @@ export default {
|
||||
},
|
||||
rules2: { // 表单验证规则
|
||||
本次付款: [
|
||||
{ required: true, message: '请输入本次付款金额', trigger: 'blur' },
|
||||
{ required: true, message: '请输入本次付款金额' },
|
||||
{ required: true, trigger: 'blur', validator: validateValue }],
|
||||
付款时间: [{ required: true, message: '请输入付款时间', trigger: 'change' }],
|
||||
付款阶段id: [{ required: true, message: '请输入付款阶段', trigger: 'change' }]
|
||||
付款时间: [{ required: true, message: '请输入付款时间' }]
|
||||
// 付款阶段id: [{ required: true, message: '请输入付款阶段', trigger: 'change' }]
|
||||
},
|
||||
rules3: { // 表单验证规则
|
||||
转移金额: [
|
||||
@@ -725,6 +736,7 @@ export default {
|
||||
})
|
||||
},
|
||||
handleEdit2(row) {
|
||||
this.editForm(row, 'form3')
|
||||
this.title = '修改阶段收款'
|
||||
this.max1 = parseFloat(this.max2) + parseFloat(row.本次收款金额)
|
||||
this.dialogFormVisible3 = true
|
||||
@@ -965,9 +977,9 @@ export default {
|
||||
if (valid) {
|
||||
if (this.temp === 1) {
|
||||
this.addTableData1()
|
||||
this.form2.ContractNumberValue = ''
|
||||
this.form2.EntryName = ''
|
||||
this.form2.TotalContractAmount = ''
|
||||
// this.form2.ContractNumberValue = ''
|
||||
// this.form2.EntryName = ''
|
||||
// this.form2.TotalContractAmount = ''
|
||||
this.temp = null
|
||||
} else if (this.temp === 2) {
|
||||
this.chaEdit()
|
||||
@@ -1022,8 +1034,8 @@ export default {
|
||||
})
|
||||
},
|
||||
ADD() {
|
||||
this.dialogFormVisible2 = true
|
||||
this.addForm('form2')
|
||||
this.dialogFormVisible2 = true
|
||||
this.temp = 1
|
||||
},
|
||||
addTableData1() {
|
||||
@@ -1083,25 +1095,45 @@ export default {
|
||||
this.id = row.批次资金id
|
||||
this.id1 = row.资金id
|
||||
},
|
||||
submitEdit() {
|
||||
if (this.flag === 1) {
|
||||
fukuan(this.id, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('收款成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
submitEdit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.flag === 1) {
|
||||
fukuan(this.id, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('收款成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
@@ -1109,70 +1141,29 @@ export default {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('收款失败')
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('收款失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
editFukuan(this.id2, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
editFukuan(this.id2, this.form3.本次付款, this.form3.付款时间).then(response => {
|
||||
this.dialogFormVisible3 = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
AccountsReceivable().then(response => {
|
||||
const data = response.data
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
data[i].计划付款时间 = data[i].计划付款时间.substring(0, data[i].计划付款时间.length - 9)
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
@@ -1180,27 +1171,53 @@ export default {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
this.gridData = data
|
||||
this.value = response.data.length
|
||||
})
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
selectBatchFundingDetails(this.id).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
response.data[i].本次收款时间 = response.data[i].本次收款时间.substring(0, response.data[i].本次收款时间.length - 9)
|
||||
}
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
this.flag = ''
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
EditTableData(row) {
|
||||
this.editForm(row, 'form2')
|
||||
this.dialogFormVisible4 = true
|
||||
this.form2.entryNameValue = parseInt(row.项目流水号)
|
||||
this.form2.ContractNumberValue = row.合同编号
|
||||
@@ -1210,39 +1227,43 @@ export default {
|
||||
clear() {
|
||||
this.peopleid = ''
|
||||
},
|
||||
editTableData() {
|
||||
editList(this.form2.entryNameValue, this.form2.TotalContractAmount, this.zijinID).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
editTableData(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
editList(this.form2.entryNameValue, this.form2.TotalContractAmount, this.zijinID).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('更新信息成功')
|
||||
this.getTableData()
|
||||
searchTable2(this.PageCurrent2, this.PageSize2, this.moneyID).then(response => {
|
||||
const data = response.data.rows
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
if (data[i].计划付款时间 === '' || data[i].计划付款时间 === null) {
|
||||
data[i].状态 = '无计划'
|
||||
} else {
|
||||
if (data[i].未收金额 === '0') {
|
||||
data[i].状态 = '已完成'
|
||||
} else {
|
||||
if (data[i].状态 === '0') {
|
||||
data[i].状态 = '未开始'
|
||||
}
|
||||
if (data[i].状态 === '1') {
|
||||
data[i].状态 = '即将拖期'
|
||||
}
|
||||
if (data[i].状态 === '2') {
|
||||
data[i].状态 = '已拖期'
|
||||
}
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
}
|
||||
}
|
||||
data[i].未收金额 === '0' ? data[i].是否禁用 = true : data[i].是否禁用 = false
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
this.tableData2 = data
|
||||
this.total2 = response.data.total
|
||||
this.dialogFormVisible4 = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('更新信息失败')
|
||||
}
|
||||
})
|
||||
// this.editTable(editTableData, [this.zijinID, this.form2.TotalContractAmount], 'form2', function() { this.getTableData(); this.dialogFormVisible4 = false })
|
||||
|
||||
Reference in New Issue
Block a user