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 })