外协付款计划

This commit is contained in:
zhangdingyu
2018-12-21 18:03:54 +08:00
parent 91b0b29fb2
commit f76a727d89
2 changed files with 226 additions and 15 deletions

View File

@@ -67,9 +67,45 @@ export function getParts(Number, pageCurrent, pageSize) {
method: 'post',
data: {
type: '1',
name: '车间生产管理_外协加工任务单明细_查询数据',
name: '车间生产管理工艺_外协发票管理_查询数据',
param: '外协加工任务单流水号=' + Number + '=int',
Pagination: pageCurrent + '&' + pageSize
}
})
}
// 增加
export function edittype(num1, num2, num3, num4, num5, num6, num7) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_外协发票管理_增加数据',
param: '外协加工任务单流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7
}
})
}
// 编辑
export function handlechange(CoManufacturerFlowNumber, ManufacturerNumber, ManufacturerName, ManufacturerAbbreviation, address, roleName, phNumber, Fax, Remarks, category, attention, EquipmentCondition) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_修改数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '&序号=' + ManufacturerNumber + '&外协厂家名称=' + ManufacturerName + '&外协厂家简称=' + ManufacturerAbbreviation + '&地址=' + address + '&联系人=' + roleName + '&电话=' + phNumber + '&传真=' + Fax + '&备注=' + Remarks + '&类别=' + category + '&关注=' + attention + '&设备情况=' + EquipmentCondition
}
})
}
// 删除
export function handledelete(CoManufacturerFlowNumber) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_基础表_外协厂家_删除数据',
param: '外协厂家流水号=' + CoManufacturerFlowNumber + '=int'
}
})
}

View File

@@ -200,36 +200,41 @@
</div>
</el-card>
<el-card v-if="false">
<el-card>
<el-table v-loading="loading2" :data="tableData2" height="370" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column
label=" "
type="index"
align="center"
width="50"/>
<el-table-column label="零件图号" align="center" width="230px">
<el-table-column label="发票号" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.零件图 }}
{{ scope.row.发票 }}
</template>
</el-table-column>
<el-table-column label="零件名称" align="center" width="230px">
<el-table-column label="开票金额" align="center" width="230px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" width="220px">
<el-table-column label="接收人" align="center" width="220px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
{{ scope.row.接收人 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center">
<el-table-column label="开户行" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
{{ scope.row.开户行 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="180px">
<el-table-column label="开票时间" align="center" width="180px">
<template slot-scope="scope">
{{ scope.row.组号 }}
{{ 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>
@@ -267,14 +272,74 @@
</div>
</el-dialog>
<el-dialog :title="title1" :visible.sync="dialogFormVisible" center style="min-height: 300px" width="700px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="90px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="厂家名称" prop="ManufacturerName" >
<el-input v-model="form.ManufacturerName" placeholder="厂家名称" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="厂家简称" prop="ManufacturerAbbreviation">
<el-input v-model="form.ManufacturerAbbreviation" placeholder="厂家简称" clearable size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="地址" prop="address">
<el-input v-model="form.address" placeholder="地址" clearable size="small" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系人" prop="roleName">
<el-input v-model="form.roleName" placeholder="联系人" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="电话" prop="phNumber">
<el-input v-model="form.phNumber" placeholder="电话" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="传真" prop="Fax">
<el-input v-model="form.Fax" placeholder="传真" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="设备情况" prop="EquipmentCondition">
<el-input v-model="form.EquipmentCondition" placeholder="设备情况" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="Remarks">
<el-input v-model="form.Remarks" placeholder="备注" clearable size="small" />
</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>
</div>
</template>
<script>
import { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
import { initOutHelp, searchtable, payTime, WithdrawingEdit, getParts, edittype, handlechange, handledelete } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
export default {
data() {
return {
title1: '',
dialogFormVisible: false,
count1: 0,
form: {},
实际付款时间: '',
loading: false,
loading2: false,
@@ -437,12 +502,123 @@ export default {
this.tableData2 = []
this.zhongjianbianliang = row.外协加工任务单流水号
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
console.log(response.data)
this.tableData2 = response.data.rows
this.total2 = response.data.total
}).then(() => {
this.loading2 = false
})
},
// 点击增加
editType1(formName) {
this.count1 = this.count1 + 1
if (this.count1 !== 1) {
this.$refs[formName].resetFields()
}
this.title1 = '增加'
this.form.ManufacturerName = ''
this.dialogFormVisible = true
},
// 增加确定
editType() {
edittype(this.form.ManufacturerNumber, this.form.ManufacturerName, this.form.ManufacturerAbbreviation, this.form.address, this.form.roleName, this.form.phNumber, this.form.Fax, this.form.Remarks, this.form.category, this.form.attention, this.form.EquipmentCondition).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息增加成功',
type: 'success'
})
this.pageCurrent = 1
this.pageSize = 10
this.searchTable()
} else {
this.$message.error('信息增加失败')
}
})
this.dialogFormVisible = false
},
// 编辑打开
handleChange1(index, row, formName) {
this.count2 = this.count2 + 1
if (this.count2 !== 1) {
this.$refs[formName].resetFields()
}
this.form.ManufacturerNumber = row.序号
this.form.ManufacturerName = row.外协厂家名称
this.form.address = row.地址
this.form.roleName = row.联系人
this.form.phNumber = row.电话
this.form.Fax = row.传真
this.form.Remarks = row.备注
this.form.category = row.类别
this.form.EquipmentCondition = row.设备情况
this.form.ManufacturerAbbreviation = row.外协厂家简称
this.form.attention = row.关注
this.dialogFormVisible = true
this.title1 = '编辑'
this.CoManufacturerFlowNumber1 = row.外协厂家流水号
},
// 编辑确定
handleChange() {
handlechange(this.CoManufacturerFlowNumber1, this.form.ManufacturerNumber, this.form.ManufacturerName, this.form.ManufacturerAbbreviation, this.form.address, this.form.roleName, this.form.phNumber, this.form.Fax, this.form.Remarks, this.form.category, this.form.attention, this.form.EquipmentCondition).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息修改成功',
type: 'success'
})
this.searchTable()
} else {
this.$message.error('信息修改失败')
}
})
this.dialogFormVisible = false
},
// 提交添加或者修改
submit(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.param === 0) {
this.editType()
} else {
this.handleChange()
}
} else {
return false
}
})
},
// 重置表单
callOff(formName) {
this.dialogFormVisible = false
this.$refs[formName].resetFields()
},
// 删除
handleDelete(index, row) {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
handledelete(row.外协厂家流水号).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
message: '信息删除成功',
type: 'success'
})
this.searchTable()
} else {
this.$message.error('信息删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1
@@ -478,9 +654,8 @@ export default {
.el-card{
margin-bottom: 15px;
}
</style>
<style>
.el-table .fukuan {
background: #AEF199;
}
</style>