a
This commit is contained in:
@@ -73,7 +73,7 @@ export function AddType2(num1, num2, num3) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 编辑
|
// 编辑
|
||||||
export function handleChange1(num, num2, num3, num4, num5, num6, num7, num8) {
|
export function handleChange1(num, num2, num3, num4) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -82,12 +82,12 @@ export function handleChange1(num, num2, num3, num4, num5, num6, num7, num8) {
|
|||||||
ModularID: router.currentRoute.path,
|
ModularID: router.currentRoute.path,
|
||||||
type: '2',
|
type: '2',
|
||||||
name: '车间生产管理工艺_外协发票管理_编辑数据',
|
name: '车间生产管理工艺_外协发票管理_编辑数据',
|
||||||
param: 'id=' + num + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
|
param: 'id=' + num + '&发票号=' + num2 + '&开票时间=' + num3 + '&开票金额=' + num4
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
export function handledelete(num) {
|
export function handleDelete1(num) {
|
||||||
return request({
|
return request({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@@ -100,3 +100,30 @@ export function handledelete(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function handleChange2(num, num2, num3) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_外协付款管理_编辑数据',
|
||||||
|
param: '外协付款流水号=' + num + '&付款金额=' + num2 + '&付款日期=' + num3
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
export function handleDelete2(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
UserID: state.state.user.id,
|
||||||
|
ModularID: router.currentRoute.path,
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_外协付款管理_删除数据',
|
||||||
|
param: '外协付款流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -67,6 +67,12 @@
|
|||||||
{{ scope.row.开票时间 }}
|
{{ scope.row.开票时间 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" icon="el-icon-edit" @click="ChangeOpen1(scope.row)">编辑</el-button>
|
||||||
|
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete1(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -96,6 +102,12 @@
|
|||||||
{{ scope.row.付款日期 }}
|
{{ scope.row.付款日期 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作" fixed="right" width="200px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button type="primary" size="mini" icon="el-icon-edit" @click="ChangeOpen2(scope.row)">编辑</el-button>
|
||||||
|
<el-button type="danger" size="mini" icon="el-icon-delete" @click="handleDelete2(scope.row)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -173,7 +185,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { searchtable, getInvoice, getPayment, AddType1, AddType2, handleChange1, handledelete } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
|
import { searchtable, getInvoice, getPayment, AddType1, AddType2, handleChange1, handleChange2, handleDelete1, handleDelete2 } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -195,6 +207,7 @@ export default {
|
|||||||
total3: null, // 总条数
|
total3: null, // 总条数
|
||||||
pageSize3: 50, // 每页显示条数
|
pageSize3: 50, // 每页显示条数
|
||||||
pageCurrent3: 1, // 后台获取页
|
pageCurrent3: 1, // 后台获取页
|
||||||
|
id_edit1: '',
|
||||||
param1: 0,
|
param1: 0,
|
||||||
title1: '',
|
title1: '',
|
||||||
dialogFormVisible1: false,
|
dialogFormVisible1: false,
|
||||||
@@ -203,6 +216,7 @@ export default {
|
|||||||
开票时间: '',
|
开票时间: '',
|
||||||
开票金额: ''
|
开票金额: ''
|
||||||
},
|
},
|
||||||
|
id_edit2: '',
|
||||||
param2: 0,
|
param2: 0,
|
||||||
title2: '',
|
title2: '',
|
||||||
dialogFormVisible2: false,
|
dialogFormVisible2: false,
|
||||||
@@ -321,24 +335,22 @@ export default {
|
|||||||
if (this.$refs[formName] !== undefined) {
|
if (this.$refs[formName] !== undefined) {
|
||||||
this.$refs[formName].resetFields()
|
this.$refs[formName].resetFields()
|
||||||
}
|
}
|
||||||
|
this.id_edit1 = row.id
|
||||||
this.param1 = 0
|
this.param1 = 0
|
||||||
this.title1 = '编辑发票'
|
this.title1 = '编辑发票'
|
||||||
this.form1.发票号 = row.发票号
|
this.form1.发票号 = row.发票号
|
||||||
this.form1.开票时间 = row.开票时间
|
this.form1.开票时间 = row.开票时间
|
||||||
this.form1.开票金额 = row.开票金额
|
this.form1.开票金额 = row.开票金额
|
||||||
this.form1.外协厂家 = row.外协厂家
|
|
||||||
this.dialogFormVisible1 = true
|
this.dialogFormVisible1 = true
|
||||||
},
|
},
|
||||||
// 编辑确定
|
// 编辑确定
|
||||||
handleChange1() {
|
handleChange1() {
|
||||||
handleChange1(this.CoManufacturerFlowNumber1, this.form.发票号, this.form.开户行, this.form.开票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
|
handleChange1(this.id_edit1, this.form1.发票号, this.form1.开票时间, this.form1.开票金额).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$notify({
|
this.$message.success('信息修改成功')
|
||||||
title: '成功',
|
|
||||||
message: '信息修改成功',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
this.getParts()
|
this.getParts()
|
||||||
|
this.getInvoice()
|
||||||
|
this.getPayment()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('信息修改失败')
|
this.$message.error('信息修改失败')
|
||||||
}
|
}
|
||||||
@@ -365,23 +377,21 @@ export default {
|
|||||||
this.$refs[formName].resetFields()
|
this.$refs[formName].resetFields()
|
||||||
},
|
},
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(index, row) {
|
handleDelete1(row) {
|
||||||
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
handledelete(row.id).then(response => {
|
handleDelete1(row.id).then(response => {
|
||||||
if (this.tableData && this.tableData.length === 1 && this.pageCurrent > 1) {
|
if (this.tableData2 && this.tableData2.length === 1 && this.pageCurrent2 > 1) {
|
||||||
this.pageCurrent--
|
this.pageCurrent2--
|
||||||
}
|
}
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$notify({
|
this.$message.success('信息删除成功')
|
||||||
title: '成功',
|
|
||||||
message: '信息删除成功',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
this.getParts()
|
this.getParts()
|
||||||
|
this.getInvoice()
|
||||||
|
this.getPayment()
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('信息删除失败')
|
this.$message.error('信息删除失败')
|
||||||
}
|
}
|
||||||
@@ -420,6 +430,31 @@ export default {
|
|||||||
})
|
})
|
||||||
this.dialogFormVisible2 = false
|
this.dialogFormVisible2 = false
|
||||||
},
|
},
|
||||||
|
ChangeOpen2(row, formName) {
|
||||||
|
if (this.$refs[formName] !== undefined) {
|
||||||
|
this.$refs[formName].resetFields()
|
||||||
|
}
|
||||||
|
this.id_edit2 = row.外协付款流水号
|
||||||
|
this.param2 = 0
|
||||||
|
this.title2 = '编辑发票'
|
||||||
|
this.form2.付款金额 = row.付款金额
|
||||||
|
this.form2.付款时间 = row.付款日期
|
||||||
|
this.dialogFormVisible2 = true
|
||||||
|
},
|
||||||
|
// 编辑确定
|
||||||
|
handleChange2() {
|
||||||
|
handleChange2(this.id_edit2, this.form2.付款金额, this.form2.付款时间).then(response => {
|
||||||
|
if (response.data[0].result === '1') {
|
||||||
|
this.$message.success('信息修改成功')
|
||||||
|
this.getParts()
|
||||||
|
this.getInvoice()
|
||||||
|
this.getPayment()
|
||||||
|
} else {
|
||||||
|
this.$message.error('信息修改失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.dialogFormVisible2 = false
|
||||||
|
},
|
||||||
submit2(formName) {
|
submit2(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -437,6 +472,32 @@ export default {
|
|||||||
this.dialogFormVisible2 = false
|
this.dialogFormVisible2 = false
|
||||||
this.$refs[formName].resetFields()
|
this.$refs[formName].resetFields()
|
||||||
},
|
},
|
||||||
|
handleDelete2(row) {
|
||||||
|
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
handleDelete2(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.getParts()
|
||||||
|
this.getInvoice()
|
||||||
|
this.getPayment()
|
||||||
|
} else {
|
||||||
|
this.$message.error('信息删除失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message({
|
||||||
|
type: 'info',
|
||||||
|
message: '已取消删除'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 分页
|
// 分页
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageCurrent = 1
|
this.pageCurrent = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user