修复物料监控下料时间筛选参数
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import { request } from '@/api/_service'
|
import { request } from '@/api/_service'
|
||||||
|
import qs from 'qs'
|
||||||
|
|
||||||
const BASE = 'planning_production/wip/wip_management/'
|
const BASE = 'planning_production/wip/wip_management/'
|
||||||
|
|
||||||
@@ -10,11 +11,19 @@ function apiParams (method, data = {}) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function stringifyListParams (data = {}) {
|
||||||
|
return qs.stringify(apiParams('planning_production_wip_wip_management_list', data), {
|
||||||
|
arrayFormat: 'brackets',
|
||||||
|
allowDots: true,
|
||||||
|
encode: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function getWipDataList (data) {
|
export function getWipDataList (data) {
|
||||||
return request({
|
return request({
|
||||||
url: BASE + 'list',
|
url: BASE + 'list?' + stringifyListParams(data),
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: apiParams('planning_production_wip_wip_management_list', data)
|
params: {}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,11 @@
|
|||||||
<el-form-item :label="$t(key('finish_time'))" prop="start_time">
|
<el-form-item :label="$t(key('finish_time'))" prop="start_time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="search.start_time"
|
v-model="search.start_time"
|
||||||
type="datetimerange"
|
type="daterange"
|
||||||
range-separator="-"
|
range-separator="-"
|
||||||
:start-placeholder="$t(key('start_time'))"
|
:start-placeholder="$t(key('start_time'))"
|
||||||
:end-placeholder="$t(key('end_time'))"
|
:end-placeholder="$t(key('end_time'))"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd"
|
||||||
style="width:330px"
|
style="width:330px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -166,8 +166,10 @@ export default {
|
|||||||
workingsubclass: this.search.workingsubclass || undefined
|
workingsubclass: this.search.workingsubclass || undefined
|
||||||
}
|
}
|
||||||
if (Array.isArray(this.search.start_time) && this.search.start_time.length === 2) {
|
if (Array.isArray(this.search.start_time) && this.search.start_time.length === 2) {
|
||||||
params.start_time = this.search.start_time[0]
|
params.start_time = [
|
||||||
params.end_time = this.search.start_time[1]
|
`${this.search.start_time[0]} 00:00:00`,
|
||||||
|
`${this.search.start_time[1]} 23:59:59`
|
||||||
|
]
|
||||||
}
|
}
|
||||||
return params
|
return params
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user