From cdd5c94975ead64b40b08721d46903cd2c1e2df9 Mon Sep 17 00:00:00 2001 From: zhangdingyu <974548713@qq.com> Date: Fri, 22 Nov 2019 12:28:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E5=8D=8F=E4=BB=98=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutsourcingPaymentPlanManagement.js | 6 +- .../index.vue | 238 ++++++++++-------- 2 files changed, 134 insertions(+), 110 deletions(-) diff --git a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js index afa0a20c..75360d87 100644 --- a/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js +++ b/src/api/Outsourcing/OutsourcingPaymentPlanManagement.js @@ -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 } }) } diff --git a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue index 9edf733b..bf2a7eeb 100644 --- a/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue +++ b/src/views/Outsourcing/OutsourcingPaymentPlanManagement/index.vue @@ -1,6 +1,45 @@ - - - - - - - - - - + + + + + + + + - + - + @@ -272,7 +265,7 @@ + + + + + + + + + @@ -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() } } }