月底工时查询

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

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