This commit is contained in:
Vergil
2020-02-10 15:09:59 +08:00
parent d5ed9b2da5
commit 556c7cc51f
2 changed files with 62 additions and 99 deletions

View File

@@ -40,14 +40,14 @@ export function getPayment(Number, pageCurrent, pageSize) {
})
}
// 增加
export function edittype(num1, num2, num3, num4, num5, num6, num7, num8) {
export function AddType1(num1, num2, num3, num4) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_外协发票管理_增加数据',
param: '外协厂家流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
name: '车间生产管理工艺_外协付款_新增发票',
param: '外协厂家流水号=' + num1 + '&发票号=' + num2 + '&开票时间=' + num3 + '&开票金额=' + num4
}
})
}

View File

@@ -5,7 +5,7 @@
<el-row>
<span>外协厂家:</span>
<el-input v-model="ManufacturerName" size="small" placeholder="外协厂家" clearable style="width:200px"/>
<el-button type="primary" class="el-icon-search" size="small" plain @click="pageCurrent=1;pageSize=20;getParts()">查询</el-button>
<el-button type="primary" class="el-icon-search" size="small" plain @click="pageCurrent=1;pageSize=50;getParts()">查询</el-button>
</el-row>
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row height="500" style="width: 100%;" border element-loading-text="拼命加载中" @row-click="rowClick">
<el-table-column label="厂家" prop="外协厂家名称" align="center" width="230px">
@@ -13,38 +13,32 @@
{{ scope.row.外协厂家名称 }}
</template>
</el-table-column>
<el-table-column label="外协金额" prop="总价" align="center" width="200px">
<el-table-column label="外协金额(元)" prop="总价" align="center" width="200px">
<template slot-scope="scope">
{{ scope.row.总价 }}
</template>
</el-table-column>
<el-table-column label="到票金额" align="center" width="130px" prop="开票金额">
<el-table-column label="到票金额(元)" align="center" width="130px" prop="开票金额">
<template slot-scope="scope">
{{ scope.row.开票金额 }}
</template>
</el-table-column>
<el-table-column label="付款金额" align="center">
<el-table-column label="付款金额(元)" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="未付金额" align="center">
<el-table-column label="未付金额(元)" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200px">
<template slot-scope="scope">
<el-button size="mini" type="primary" plain class="el-icon-edit" @click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
<el-button size="mini" type="danger" plain 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="!loading"
:current-page="pageCurrent"
:page-sizes="[20, 30, 40]"
:page-sizes="[50, 100]"
:page-size="pageSize"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@@ -55,7 +49,7 @@
<el-col :span="8">
<el-row>
<span style="margin-top: 10px">开票明细:</span>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">新增</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd1()">新增</el-button>
</el-row>
<el-table v-loading="loading2" :data="tableData2" size="mini" stripe height="500" style="width: 100%" border element-loading-text="拼命加载中">
<el-table-column label="发票号" prop="外协厂家名称" align="center" width="230px">
@@ -78,7 +72,7 @@
<el-pagination
v-if="!loading2"
:current-page="pageCurrent2"
:page-sizes="[20, 30, 40]"
:page-sizes="[50, 100]"
:page-size="pageSize2"
:total="total2"
layout="total, sizes, prev, pager, next, jumper"
@@ -89,7 +83,7 @@
<el-col :span="8">
<el-row>
<span style="margin-top: 10px">付款明细:</span>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd()">新增</el-button>
<el-button class="button111" size="small" icon="el-icon-circle-plus-outline" style="margin-left:10px" @click="handleAdd2()">新增</el-button>
</el-row>
<el-table v-loading="loading3" :data="tableData3" size="mini" stripe height="500" style="width: 100%" border element-loading-text="拼命加载中">
<el-table-column label="付款金额" prop="外协厂家名称" align="center" width="230px">
@@ -107,7 +101,7 @@
<el-pagination
v-if="!loading3"
:current-page="pageCurrent3"
:page-sizes="[20, 30, 40]"
:page-sizes="[50, 100]"
:page-size="pageSize3"
:total="total3"
layout="total, sizes, prev, pager, next, jumper"
@@ -117,38 +111,22 @@
</el-col>
</el-card>
<el-dialog v-el-drag-dialog :title="title1" :visible.sync="dialogFormVisible1" 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 v-show="title1==='到票'">
<el-col :span="12">
<el-form-item label="外协厂家" prop="外协厂家" >
<el-select v-model="form.外协厂家" placeholder="外协厂家" filterable clearable size="small">
<el-option
v-for="item in 外协厂家"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible1" title="新增发票" center style="min-height: 300px" width="400px">
<el-form ref="form1" :model="form1" :rules="rules" label-position="left" label-width="100px" class="demo-ruleForm">
<el-row>
<el-col :span="12">
<el-form-item label="发票号" prop="发票号" >
<el-input v-model="form.发票号" placeholder="发票号" style="width:200px" clearable size="small"/>
<el-input v-model="form1.发票号" placeholder="发票号" style="width:200px" clearable size="small"/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="开票金额" prop="开票金额">
<el-input v-model="form1.开票金额" placeholder="开票金额" style="width:200px" clearable size="small"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="开票金额" prop="开票金额">
<el-input v-model="form.开票金额" placeholder="开票金额" style="width:200px" clearable size="small"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="开票时间" prop="开票时间">
<el-date-picker
v-model="form.开票时间"
v-model="form1.开票时间"
style="width:200px"
size="small"
type="date"
@@ -157,53 +135,45 @@
clearable
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>
<el-button @click="callOff1('form1')">取消</el-button>
<el-button type="primary" @click="submit1('form1')" >确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { searchtable, getInvoice, getPayment, edittype, handlechange, handledelete } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
import { searchtable, getInvoice, getPayment, AddType1, handlechange, handledelete } from '@/api/Outsourcing/OutsourcingPaymentPlanManagement'
export default {
data() {
return {
ManufacturerName: '', // 外协厂家
外协厂家流水号: '',
title1: '',
dialogFormVisible1: false,
form: {
外协厂家: '',
发票号: '',
开户行: '',
开票时间: '',
开票金额: '',
接收人: '',
接收时间: '',
备注: ''
},
外协厂家: [],
rules: {},
loading: false,
tableData: [], // 表格数据
total: null, // 总条数
pageSize: 20, // 每页显示条数
pageSize: 50, // 每页显示条数
pageCurrent: 1, // 后台获取页
loading2: false,
tableData2: [], // 表格数据
total2: null, // 总条数
pageSize2: 20, // 每页显示条数
pageSize2: 50, // 每页显示条数
pageCurrent2: 1, // 后台获取页
loading3: false,
tableData3: [], // 表格数据
total3: null, // 总条数
pageSize3: 20, // 每页显示条数
pageCurrent3: 1 // 后台获取页
pageSize3: 50, // 每页显示条数
pageCurrent3: 1, // 后台获取页
dialogFormVisible1: false,
form1: {
发票号: '',
开票时间: '',
开票金额: ''
},
rules: {}
}
},
created() {
@@ -276,21 +246,16 @@ export default {
})
},
// 点击增加
editType1(formName) {
this.title1 = '到票'
this.form.发票号 = ''
this.form.户行 = ''
this.form.开票时间 = ''
this.form.开票金额 = ''
this.form.接收人 = ''
this.form.接收时间 = ''
this.form.备注 = ''
this.form.外协厂家 = ''
handleAdd1(formName) {
this.form1.发票号 = ''
this.form1.开票时间 = ''
this.form1.票金额 = ''
this.form1.外协厂家 = ''
this.dialogFormVisible1 = true
},
// 增加确定
editType() {
edittype(this.form.外协厂家, this.form.发票号, this.form.户行, this.form.票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
AddType1() {
AddType1(this.外协厂家流水号, this.form.发票号, this.form.开票时间, this.form.开票金额, this.form.外协厂家).then(response => {
if (response.data[0].result === '1') {
this.$notify({
title: '成功',
@@ -306,17 +271,15 @@ export default {
},
// 编辑打开
handleChange1(index, row, formName) {
this.form.外协厂家 = row.外协厂家流水号
this.form.发票号 = row.发票号
this.form.开户行 = row.开户行
this.form.开票时间 = row.开票时间
this.form.开票金额 = row.开票金额
this.form.接收人 = row.接收人
this.form.接收时间 = row.接收时间
this.form.备注 = row.备注
this.form1.外协厂家 = row.外协厂家流水号
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.title1 = '编辑'
this.CoManufacturerFlowNumber1 = row.id
},
// 编辑确定
handleChange() {