月底工时查询

This commit is contained in:
Vergil
2020-03-01 15:35:51 +08:00
parent 36b463800b
commit ca6652f65e
2 changed files with 7 additions and 5 deletions

View File

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

View File

@@ -14,6 +14,7 @@
end-placeholder="结束日期"/>
<el-input v-model="name" size="small" placeholder="操作工" style="width: 150px" clearable/>
<el-input v-model="partNumber" size="small" placeholder="零件图号" style="width: 150px" clearable/>
<el-checkbox v-model="check" class="remeberPassword">查询全部</el-checkbox>
<el-button size="small" type="primary" icon="el-icon-search" style="margin-left: 5px" plain @click="pageCurrent=1;pageSize=50;searchTable()">查询</el-button>
<el-button size="small" type="primary" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
@@ -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
})