外协付款
This commit is contained in:
@@ -61,14 +61,14 @@ export function payment(num) {
|
||||
})
|
||||
}
|
||||
// 查询零件信息
|
||||
export function getParts(Number, pageCurrent, pageSize) {
|
||||
export function getParts(check, Number, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_外协发票管理_查询数据',
|
||||
param: '外协厂家流水号=' + Number + '=int',
|
||||
param: '外协厂家流水号_check=' + check + '外协厂家流水号=' + Number + '=int',
|
||||
Pagination: pageCurrent + '&' + pageSize
|
||||
}
|
||||
})
|
||||
@@ -81,7 +81,7 @@ export function edittype(num1, num2, num3, num4, num5, num6, num7, num8) {
|
||||
data: {
|
||||
type: '2',
|
||||
name: '车间生产管理工艺_外协发票管理_增加数据',
|
||||
param: '外协加工任务单流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
|
||||
param: '外协厂家流水号=' + num1 + '&发票号=' + num2 + '&开户行=' + num3 + '&开票时间=' + num4 + '&开票金额=' + num5 + '&接收人=' + num6 + '&接收时间=' + num7 + '&备注=' + num8
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,6 +1,45 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<!--<el-card>-->
|
||||
<!--<span>表单号:</span>-->
|
||||
<!--<el-input v-model="FormNumber" placeholder="表单号" clearable size="small" style="width:190px;margin:10px;"/>-->
|
||||
<!--<span>任务下达时间段:</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date1"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span>~</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date2"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span>实际付款时间段:</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date3"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span>~</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date4"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--</el-card>-->
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>厂家:</span>
|
||||
@@ -11,49 +50,9 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=10;pageCurrent2=1;pageSize2=10;searchTable()">查询</el-button>
|
||||
<!--<span>表单号:</span>-->
|
||||
<!--<el-input v-model="FormNumber" placeholder="表单号" clearable size="small" style="width:190px;margin:10px;"/>-->
|
||||
<!--<span>任务下达时间段:</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date1"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span>~</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date2"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span>实际付款时间段:</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date3"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<!--<span>~</span>-->
|
||||
<!--<el-date-picker-->
|
||||
<!--v-model="date4"-->
|
||||
<!--style="width:190px;margin:10px;"-->
|
||||
<!--size="small"-->
|
||||
<!--type="date"-->
|
||||
<!--value-format="yyyy-MM-dd"-->
|
||||
<!--format="yyyy-MM-dd"-->
|
||||
<!--placeholder="选择日期"/>-->
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent=1;pageSize=20;searchTable()">查询</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData" height="580" size="mini" stripe style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中" @row-click="getParts">
|
||||
<el-table v-loading="loading" :data="tableData" height="500" size="mini" stripe style="width: 100%;" border highlight-current-row element-loading-text="拼命加载中">
|
||||
<el-table-column label="序号" type="index" align="center" fixed="left" width="50"/>
|
||||
<el-table-column label="付款" prop="实际付款时间" width="65" align="center" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
@@ -67,12 +66,12 @@
|
||||
<el-tag v-else type="info" size="small">未到</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="表单号" prop="表单号" align="center" width="180px" fixed="left">
|
||||
<el-table-column label="单据号" prop="表单号" align="center" width="180px" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.表单号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协厂家" prop="外协厂家名称" align="center" min-width="200px">
|
||||
<el-table-column label="外协厂家" prop="外协厂家名称" align="center" min-width="190px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
</template>
|
||||
@@ -82,22 +81,20 @@
|
||||
{{ scope.row.总价 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="扣款" align="center">
|
||||
<el-table-column label="质量" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_质量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_计划 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_其他 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质量扣款" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_质量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划扣款" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_计划 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他扣款" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.扣款_其他 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="应付金额" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
@@ -168,17 +165,11 @@
|
||||
{{ scope.row.扣款说明 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="280px" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="记录外协付款到票信息" placement="top">
|
||||
<el-button
|
||||
:disabled="scope.row.实际付款时间!==''"
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
class="el-icon-check"
|
||||
@click="editType1(scope.row, 'form');param = 0">到票</el-button>
|
||||
</el-tooltip>
|
||||
<!--<el-tooltip :open-delay="1200" effect="dark" content="记录外协付款到票信息" placement="top">-->
|
||||
<!--<el-button :disabled="scope.row.实际付款时间!==''" size="mini" type="primary" plain class="el-icon-check" @click="editType1(scope.row, 'form');param = 0">到票</el-button>-->
|
||||
<!--</el-tooltip>-->
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="记录外协扣款信息" placement="top">
|
||||
<el-button
|
||||
:disabled="scope.row.实际付款时间!==''"
|
||||
@@ -203,7 +194,7 @@
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-sizes="[20, 30, 40]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -213,33 +204,47 @@
|
||||
</el-card>
|
||||
|
||||
<el-card>
|
||||
<el-row>
|
||||
<span>厂家:</span>
|
||||
<el-select v-model="ManufacturerNameValue2" placeholder="选择外协厂家" filterable clearable size="small" style="width:190px;margin:10px;">
|
||||
<el-option
|
||||
v-for="item in ManufacturerName2"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="success" class="el-icon-search" size="small" @click="pageCurrent2=1;pageSize2=20;getParts()">查询</el-button>
|
||||
<el-tooltip :open-delay="1200" effect="dark" content="记录外协付款到票信息" placement="top">
|
||||
<el-button size="small" type="primary" plain class="el-icon-check" @click="editType1('form');param = 0">到票</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
<el-table v-loading="loading2" :data="tableData2" :summary-method="getSummaries" size="mini" stripe height="370" show-summary style="width: 100%;" border element-loading-text="拼命加载中">
|
||||
<el-table-column label="发票号" prop="发票号" align="center" width="230px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.发票号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收人" prop="接收人" align="center" width="180px">
|
||||
<el-table-column label="接收人" prop="接收人" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开户行" align="center">
|
||||
<el-table-column label="开户行" align="center" width="150px" show-overflow-tooltip="">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开户行 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开票金额" align="center" width="150px" prop="开票金额">
|
||||
<el-table-column label="开票金额" align="center" width="100px" prop="开票金额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票金额 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开票日期" align="center">
|
||||
<el-table-column label="开票日期" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.开票时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="接收日期" align="center">
|
||||
<el-table-column label="接收日期" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.接收时间 }}
|
||||
</template>
|
||||
@@ -249,22 +254,10 @@
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200px" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="fukuanshijian!==''"
|
||||
size="mini"
|
||||
type="primary"
|
||||
plain
|
||||
class="el-icon-edit"
|
||||
@click="handleChange1(scope.$index, scope.row, 'form');param = 1">编辑</el-button>
|
||||
<el-button
|
||||
:disabled="fukuanshijian!==''"
|
||||
size="mini"
|
||||
type="danger"
|
||||
plain
|
||||
class="el-icon-delete"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
<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>
|
||||
@@ -272,7 +265,7 @@
|
||||
<el-pagination
|
||||
v-if="!loading2"
|
||||
:current-page="pageCurrent2"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
:page-sizes="[20, 30, 40]"
|
||||
:page-size="pageSize2"
|
||||
:total="total2"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@@ -304,6 +297,19 @@
|
||||
|
||||
<el-dialog v-el-drag-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 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-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="发票号" prop="发票号" >
|
||||
@@ -384,6 +390,7 @@ export default {
|
||||
count1: 0,
|
||||
count2: 0,
|
||||
form: {
|
||||
外协厂家: '',
|
||||
发票号: '',
|
||||
开户行: '',
|
||||
开票时间: '',
|
||||
@@ -392,6 +399,7 @@ export default {
|
||||
接收时间: '',
|
||||
备注: ''
|
||||
},
|
||||
外协厂家: [],
|
||||
实际付款时间: '',
|
||||
loading: false,
|
||||
loading2: false,
|
||||
@@ -404,6 +412,7 @@ export default {
|
||||
扣款说明: ''
|
||||
},
|
||||
rules: {
|
||||
外协厂家: [{ required: true, message: '请选择外协厂家', trigger: 'change' }],
|
||||
发票号: [{ required: true, message: '请输入发票号', trigger: 'blur' }],
|
||||
开票金额: [{ required: true, message: '请输入开票金额', trigger: 'blur' }],
|
||||
扣款说明: [{ required: true, message: '请输入扣款说明', trigger: 'blur' }]
|
||||
@@ -415,23 +424,26 @@ export default {
|
||||
FormNumber: '',
|
||||
ManufacturerNameValue: '',
|
||||
ManufacturerName: [], // 厂家名称
|
||||
ManufacturerNameValue2: '',
|
||||
ManufacturerName2: [], // 厂家名称
|
||||
FormNumber_check: false,
|
||||
ManufacturerNameValue_check: false,
|
||||
date1_check: false,
|
||||
date3_check: false,
|
||||
tableData: [], // 表格数据
|
||||
total: null, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageSize: 20, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
tableData2: [], // 表格数据
|
||||
total2: null, // 总条数
|
||||
pageSize2: 10, // 每页显示条数
|
||||
pageSize2: 20, // 每页显示条数
|
||||
pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable()
|
||||
this.getParts()
|
||||
},
|
||||
methods: {
|
||||
getSummaries(param) {
|
||||
@@ -462,12 +474,22 @@ export default {
|
||||
// 初始化外协厂家
|
||||
fetchData() {
|
||||
this.ManufacturerName = []
|
||||
this.ManufacturerName2 = []
|
||||
this.外协厂家 = []
|
||||
initOutHelp().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.ManufacturerName.push({
|
||||
label: response.data[i].外协厂家名称,
|
||||
value: response.data[i].外协厂家流水号
|
||||
})
|
||||
this.ManufacturerName2.push({
|
||||
label: response.data[i].外协厂家名称,
|
||||
value: response.data[i].外协厂家流水号
|
||||
})
|
||||
this.外协厂家.push({
|
||||
label: response.data[i].外协厂家名称,
|
||||
value: response.data[i].外协厂家流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -577,12 +599,12 @@ export default {
|
||||
this.$refs[formName].resetFields()
|
||||
},
|
||||
// 获取表格2数据
|
||||
getParts(row) {
|
||||
getParts() {
|
||||
this.loading2 = true
|
||||
this.tableData2 = []
|
||||
this.zhongjianbianliang = row.外协加工任务单流水号
|
||||
this.fukuanshijian = row.实际付款时间
|
||||
getParts(row.外协加工任务单流水号, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
let check
|
||||
this.ManufacturerNameValue2 ? check = 1 : check = 0
|
||||
getParts(check, this.ManufacturerNameValue2, this.pageCurrent2, this.pageSize2).then(response => {
|
||||
if (response.data.rows.length === 0) {
|
||||
this.loading2 = false
|
||||
} else {
|
||||
@@ -612,13 +634,13 @@ export default {
|
||||
})
|
||||
},
|
||||
// 点击增加
|
||||
editType1(row, formName) {
|
||||
editType1(formName) {
|
||||
this.count1 = this.count1 + 1
|
||||
if (this.count1 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.title1 = '到票'
|
||||
this.renwudan = row.外协加工任务单流水号
|
||||
// this.renwudan = row.外协加工任务单流水号
|
||||
this.form.发票号 = ''
|
||||
this.form.开户行 = ''
|
||||
this.form.开票时间 = ''
|
||||
@@ -626,18 +648,19 @@ export default {
|
||||
this.form.接收人 = ''
|
||||
this.form.接收时间 = ''
|
||||
this.form.备注 = ''
|
||||
this.form.外协厂家 = ''
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 增加确定
|
||||
editType() {
|
||||
edittype(this.renwudan, this.form.发票号, this.form.开户行, this.form.开票时间, this.form.开票金额, this.form.接收人, this.form.接收时间, this.form.备注).then(response => {
|
||||
edittype(this.form.外协厂家, 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.getParts2()
|
||||
this.getParts()
|
||||
} else {
|
||||
this.$message.error('信息增加失败')
|
||||
}
|
||||
@@ -650,6 +673,7 @@ export default {
|
||||
if (this.count2 !== 1) {
|
||||
this.$refs[formName].resetFields()
|
||||
}
|
||||
this.form.外协厂家 = row.外协厂家流水号
|
||||
this.form.发票号 = row.发票号
|
||||
this.form.开户行 = row.开户行
|
||||
this.form.开票时间 = row.开票时间
|
||||
@@ -670,7 +694,7 @@ export default {
|
||||
message: '信息修改成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getParts2()
|
||||
this.getParts()
|
||||
} else {
|
||||
this.$message.error('信息修改失败')
|
||||
}
|
||||
@@ -713,7 +737,7 @@ export default {
|
||||
message: '信息删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getParts2()
|
||||
this.getParts()
|
||||
} else {
|
||||
this.$message.error('信息删除失败')
|
||||
}
|
||||
@@ -738,12 +762,12 @@ export default {
|
||||
handleSizeChange2(val) {
|
||||
this.pageCurrent2 = 1
|
||||
this.pageSize2 = val
|
||||
this.getParts2()
|
||||
this.getParts()
|
||||
},
|
||||
handleCurrentChange2(val) {
|
||||
this.pageCurrent2 = val
|
||||
this.tableData2 = []
|
||||
this.getParts2()
|
||||
this.getParts()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user