外协付款计划
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table v-loading="loading" :data="tableData" height="400" style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中" @row-click="getParts3">
|
||||
<el-table-column
|
||||
label=" "
|
||||
type="index"
|
||||
@@ -59,70 +59,116 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-table v-loading="loading2" :data="tableData2" :summary-method="getSummaries" height="370" show-summary style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="发票号" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收人" align="center" width="180px">
|
||||
<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="150px" prop="开票金额">
|
||||
<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
|
||||
:disabled="fukuanshijian!==''"
|
||||
size="mini"
|
||||
type="primary"
|
||||
class="el-icon-edit"
|
||||
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="fukuanshijian!==''"
|
||||
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="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-tabs type="border-card">
|
||||
<el-tab-pane label="付款明细">
|
||||
<el-table v-loading="loading3" :data="tableData3" height="370" style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="付款金额" align="center" width="230px">
|
||||
<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="handleChange3(scope.row, 'form2');param = 1">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete3(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading3"
|
||||
:current-page="pageCurrent3"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-size="pageSize3"
|
||||
:total="total3"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange3"
|
||||
@current-change="handleCurrentChange3"/>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="到票明细">
|
||||
<el-table v-loading="loading2" :data="tableData2" :summary-method="getSummaries" height="370" show-summary style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="发票号" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收人" align="center" width="180px">
|
||||
<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="150px" prop="开票金额">
|
||||
<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="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</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="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-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title1" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="700px">
|
||||
@@ -212,7 +258,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initOutHelp, searchtable, getParts, edittype, handlechange, handledelete, outPay } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement2'
|
||||
import { initOutHelp, searchtable, getParts, edittype, handlechange, handledelete, getParts3, outPay, edit, handledelete3 } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement2'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -224,6 +270,7 @@ export default {
|
||||
count1: 0,
|
||||
count2: 0,
|
||||
count3: 0,
|
||||
count4: 0,
|
||||
form: {
|
||||
发票号: '',
|
||||
开户行: '',
|
||||
@@ -236,7 +283,9 @@ export default {
|
||||
实际付款时间: '',
|
||||
loading: false,
|
||||
loading2: false,
|
||||
zhongjianbianliang: '',
|
||||
loading3: false,
|
||||
zhongjianbianliang1: '',
|
||||
zhongjianbianliang2: '',
|
||||
dialogFormVisible2: false,
|
||||
form2: {
|
||||
付款金额: '',
|
||||
@@ -266,7 +315,11 @@ export default {
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
pageCurrent2: 1, // 后台获取页
|
||||
tableData3: [], // 表格数据
|
||||
total3: null, // 总条数
|
||||
pageSize3: 10, // 每页显示条数
|
||||
pageCurrent3: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -321,6 +374,7 @@ export default {
|
||||
}
|
||||
this.tableData = []
|
||||
this.tableData2 = []
|
||||
this.tableData3 = []
|
||||
searchtable(this.ManufacturerNameValue_check, this.ManufacturerNameValue, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData = response.data.rows
|
||||
this.total = response.data.total
|
||||
@@ -328,6 +382,47 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
getParts3(row) {
|
||||
this.loading3 = true
|
||||
this.tableData3 = []
|
||||
this.zhongjianbianliang1 = row.外协厂家流水号
|
||||
getParts3(row.外协厂家流水号, this.pageCurrent3, this.pageSize3).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].付款日期 = response.data.rows[i].付款日期.split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading3 = false
|
||||
})
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.zhongjianbianliang2 = row.外协厂家流水号
|
||||
getParts(this.zhongjianbianliang2, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].开票时间 = response.data.rows[i].开票时间.substring(0, response.data.rows[i].开票时间.indexOf(' '))
|
||||
response.data.rows[i].接收时间 = response.data.rows[i].接收时间.substring(0, response.data.rows[i].接收时间.indexOf(' '))
|
||||
}
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
},
|
||||
getParts4() {
|
||||
this.loading3 = true
|
||||
this.tableData3 = []
|
||||
getParts3(this.zhongjianbianliang1, this.pageCurrent3, this.pageSize3).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].付款日期 = response.data.rows[i].付款日期.split(' ')[0]
|
||||
}
|
||||
this.tableData3 = response.data.rows
|
||||
this.total3 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading3 = false
|
||||
})
|
||||
},
|
||||
// 新增付款打开
|
||||
payment(row, formName) {
|
||||
this.count3 = this.count3 + 1
|
||||
if (this.count3 !== 1) {
|
||||
@@ -348,20 +443,68 @@ export default {
|
||||
this.form2.备注 = ''
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 新增付款确定
|
||||
outPay() {
|
||||
outPay(this.factury, this.form2.付款金额, this.payDate, this.form2.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息增加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$message.success('信息增加成功')
|
||||
this.searchTable()
|
||||
this.getParts4()
|
||||
} else {
|
||||
this.$message.error('信息增加失败')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 编辑付款打开
|
||||
handleChange3(row, formName) {
|
||||
this.count4 = this.count4 + 1
|
||||
if (this.count4 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.factury = row.外协付款流水号
|
||||
this.form2.付款金额 = row.付款金额
|
||||
this.form2.备注 = row.备注
|
||||
this.dialogFormVisible2 = true
|
||||
},
|
||||
// 编辑付款确定
|
||||
edit() {
|
||||
edit(this.factury, this.form2.付款金额, this.form2.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息修改成功')
|
||||
this.searchTable()
|
||||
this.getParts4()
|
||||
} else {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
})
|
||||
this.dialogFormVisible = false
|
||||
},
|
||||
// 删除
|
||||
handleDelete3(index, row) {
|
||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
handledelete3(row.外协付款流水号).then(response => {
|
||||
if (this.tableData3 && this.tableData3.length === 1 && this.pageCurrent3 > 1) {
|
||||
this.pageCurrent3--
|
||||
}
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('信息删除成功')
|
||||
this.searchTable()
|
||||
this.getParts4()
|
||||
} else {
|
||||
this.$message.error('信息删除失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
},
|
||||
submit2(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -369,34 +512,23 @@ export default {
|
||||
this.outPay()
|
||||
this.dialogFormVisible2 = false
|
||||
} else {
|
||||
this.handleChange()
|
||||
this.edit()
|
||||
this.dialogFormVisible2 = false
|
||||
}
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取表格2数据
|
||||
getParts(row) {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.zhongjianbianliang = row.外协加工任务单流水号
|
||||
this.fukuanshijian = row.实际付款时间
|
||||
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].开票时间 = response.data.rows[i].开票时间.substring(0, response.data.rows[i].开票时间.indexOf(' '))
|
||||
response.data.rows[i].接收时间 = response.data.rows[i].接收时间.substring(0, response.data.rows[i].接收时间.indexOf(' '))
|
||||
}
|
||||
this.tableData2 = response.data.rows
|
||||
this.total2 = response.data.total
|
||||
}).then(() => {
|
||||
this.loading2 = false
|
||||
})
|
||||
callOff2(formName) {
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 获取表格2数据
|
||||
getParts2() {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
getParts(this.zhongjianbianliang, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
getParts(this.zhongjianbianliang2, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
response.data.rows[i].开票时间 = response.data.rows[i].开票时间.substring(0, response.data.rows[i].开票时间.indexOf(' '))
|
||||
response.data.rows[i].接收时间 = response.data.rows[i].接收时间.substring(0, response.data.rows[i].接收时间.indexOf(' '))
|
||||
@@ -414,7 +546,7 @@ export default {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.title1 = '增加'
|
||||
this.renwudan = row.外协加工任务单流水号
|
||||
this.renwudan = row.外协厂家流水号
|
||||
this.form.发票号 = ''
|
||||
this.form.开户行 = ''
|
||||
this.form.开票时间 = ''
|
||||
@@ -428,11 +560,7 @@ export default {
|
||||
editType() {
|
||||
edittype(this.renwudan, this.form.发票号, this.form.开户行, this.form.开票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息增加成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$message.error('信息增加成功')
|
||||
this.getParts2()
|
||||
} else {
|
||||
this.$message.error('信息增加失败')
|
||||
@@ -461,11 +589,7 @@ export default {
|
||||
handleChange() {
|
||||
handlechange(this.CoManufacturerFlowNumber1, this.form.发票号, this.form.开户行, this.form.开票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$message.success('信息编辑成功')
|
||||
this.getParts2()
|
||||
} else {
|
||||
this.$message.error('信息修改失败')
|
||||
@@ -504,11 +628,7 @@ export default {
|
||||
this.pageCurrent2--
|
||||
}
|
||||
if (response.data[0].result === '1') {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: '信息删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$message.success('信息删除成功')
|
||||
this.getParts2()
|
||||
} else {
|
||||
this.$message.error('信息删除失败')
|
||||
@@ -540,6 +660,15 @@ export default {
|
||||
this.pageCurrent2 = val
|
||||
this.tableData2 = []
|
||||
this.getParts2()
|
||||
},
|
||||
handleSizeChange3(val) {
|
||||
this.pageCurrent3 = 1
|
||||
this.pageSize3 = val
|
||||
this.getParts3()
|
||||
},
|
||||
handleCurrentChange3(val) {
|
||||
this.pageCurrent3 = val
|
||||
this.getParts3()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user