From ca6652f65e954c7488be1e36308b6ed262241f3d Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Sun, 1 Mar 2020 15:35:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=88=E5=BA=95=E5=B7=A5=E6=97=B6=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ManufacturingCenter/MonthEndHourAccounting.js | 4 ++-- .../ManufacturingCenter/MonthEndHourAccounting/index.vue | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/api/ManufacturingCenter/MonthEndHourAccounting.js b/src/api/ManufacturingCenter/MonthEndHourAccounting.js index 55a2f59f..6f15a794 100644 --- a/src/api/ManufacturingCenter/MonthEndHourAccounting.js +++ b/src/api/ManufacturingCenter/MonthEndHourAccounting.js @@ -2,7 +2,7 @@ import request from '@/utils/request' import state from '@/store' import router from '@/router' -export function searchTable(time, time1, order, orderName, check, name, check1, partNumber, pageCurrent, pageSize) { +export function searchTable(num, time, time1, order, orderName, check, name, check1, partNumber, pageCurrent, pageSize) { return request({ url: '', method: 'post', @@ -11,7 +11,7 @@ export function searchTable(time, time1, order, orderName, check, name, check1, ModularID: router.currentRoute.path, type: '1', name: '工艺月底工时核算_查询数据_最新', - param: '开始时间=' + time + '&结束时间=' + time1 + '&排序名称=' + order + '&排序方式=' + orderName + '&操作工_check=' + check + '&操作工=' + name + '&零件图号_check=' + check1 + '&零件图号=' + name, + param: '筛选=' + num + '&开始时间=' + time + '&结束时间=' + time1 + '&排序名称=' + order + '&排序方式=' + orderName + '&操作工_check=' + check + '&操作工=' + name + '&零件图号_check=' + check1 + '&零件图号=' + name, Pagination: pageCurrent + '&' + pageSize } }) diff --git a/src/views/ManufacturingCenter/MonthEndHourAccounting/index.vue b/src/views/ManufacturingCenter/MonthEndHourAccounting/index.vue index dd1759f0..48e84609 100644 --- a/src/views/ManufacturingCenter/MonthEndHourAccounting/index.vue +++ b/src/views/ManufacturingCenter/MonthEndHourAccounting/index.vue @@ -14,6 +14,7 @@ end-placeholder="结束日期"/> + 查询全部 查询 导出 @@ -149,6 +150,7 @@ import { searchTable } from '@/api/ManufacturingCenter/MonthEndHourAccounting' export default { data() { return { + check: 0, orderName: 0, order: 0, startTime: '', @@ -190,16 +192,16 @@ export default { }, searchTable() { if (this.startTime[0] && this.startTime[1]) { - let check, check1 + let check, check1, check2 this.name ? check = 1 : check = 0 this.partNumber ? check1 = 1 : check1 = 0 this.loading = true - searchTable(this.startTime[0], this.startTime[1], this.orderName, this.order, check, this.name, check1, this.partNumber, this.pageCurrent, this.pageSize).then(response => { + this.check ? check2 = 1 : check2 = 0 + searchTable(check2, this.startTime[0], this.startTime[1], this.orderName, this.order, check, this.name, check1, this.partNumber, this.pageCurrent, this.pageSize).then(response => { response.data.rows.map(v => { this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.扫码工时) / parseInt(v.计划工时) * 100) / 100.00)) }) this.tableData = response.data.rows - console.log(this.tableData) this.total = response.data.total this.loading = false })