Commit 00ac51a9 by wangchunyang

用品管理样式和时间调整

parent 52dd9769
...@@ -132,6 +132,7 @@ ...@@ -132,6 +132,7 @@
style="width: 200px" style="width: 200px"
/> />
<br> <br>
<div class="mt8">
<span>审批状态:</span> <span>审批状态:</span>
<Select <Select
v-model="filters.history.approval_status" v-model="filters.history.approval_status"
...@@ -144,6 +145,7 @@ ...@@ -144,6 +145,7 @@
<Option :value= "9">审批通过</Option> <Option :value= "9">审批通过</Option>
<Option :value= "-1">驳回</Option> <Option :value= "-1">驳回</Option>
</Select> </Select>
</div>
</Col> </Col>
<Col span="6" class="text-right"> <Col span="6" class="text-right">
<Button type="primary" class="mr10" @click="handleSearch('history')">搜索</Button> <Button type="primary" class="mr10" @click="handleSearch('history')">搜索</Button>
...@@ -917,7 +919,7 @@ export default { ...@@ -917,7 +919,7 @@ export default {
{ title: '用品名称', key: 'material_name', minWidth: 150 }, { title: '用品名称', key: 'material_name', minWidth: 150 },
{ title: '入库数量', { title: '入库数量',
key: 'inbound_quantity', key: 'inbound_quantity',
minWidth: 120, width: 120,
render: (h, params) => { render: (h, params) => {
return h('InputNumber', { return h('InputNumber', {
props: { props: {
...@@ -1150,6 +1152,9 @@ export default { ...@@ -1150,6 +1152,9 @@ export default {
return cleaned return cleaned
} }
const payload = Object.assign({}, this.pagers[tab] || {}, { params: cleanParams(this.filters[tab] || {}) }) const payload = Object.assign({}, this.pagers[tab] || {}, { params: cleanParams(this.filters[tab] || {}) })
if (payload.params.endDate) {
payload.params.endDate = payload.params.endDate.substring(0, 10) + ' 23:59:59'
}
console.log(payload) console.log(payload)
api(payload).then(ret => { api(payload).then(ret => {
if (ret.data && ret.data.errcode === 0) { if (ret.data && ret.data.errcode === 0) {
......
...@@ -113,14 +113,14 @@ export default { ...@@ -113,14 +113,14 @@ export default {
loadUsage () { loadUsage () {
this.loading.usage = true this.loading.usage = true
const st = this.usageStart ? normalizeVisitTimeValue(this.usageStart) : null const st = this.usageStart ? normalizeVisitTimeValue(this.usageStart) : null
const et = this.usageEnd ? normalizeVisitTimeValue(this.usageEnd) : null const et = this.usageEnd ? normalizeVisitTimeValue(this.usageEnd).substring(0, 10) + ' 23:59:59' : null
const params = { start: st, end: et, material: this.usageMaterial } const params = { start: st, end: et, material: this.usageMaterial }
getUsageStats(params).then(ret => { getUsageStats(params).then(ret => {
if (ret.data && ret.data.errcode === 0) this.tables.usage = ret.data.data || [] if (ret.data && ret.data.errcode === 0) this.tables.usage = ret.data.data || []
else this.$Notice.error({ title: '查询失败', desc: ret.data && ret.data.errmsg }) else this.$Notice.error({ title: '查询失败', desc: ret.data && ret.data.errmsg })
}).finally(() => { this.loading.usage = false }) }).finally(() => { this.loading.usage = false })
}, },
resetUsage () { this.usageStart = null; this.usageEnd = null; this.usageMaterial = ''; this.tables.usage = [] }, resetUsage () { this.usageStart = null; this.usageEnd = null; this.usageMaterial = ''; this.tables.usage = []; this.loadUsage() },
openUsageDetail (row) { openUsageDetail (row) {
this.detailModal.columns = [ this.detailModal.columns = [
{ title: '部门', key: 'department_name', align: 'center' }, { title: '部门', key: 'department_name', align: 'center' },
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
] ]
this.detailModal.visible = true this.detailModal.visible = true
const st = this.usageStart ? normalizeVisitTimeValue(this.usageStart) : null const st = this.usageStart ? normalizeVisitTimeValue(this.usageStart) : null
const et = this.usageEnd ? normalizeVisitTimeValue(this.usageEnd) : null const et = this.usageEnd ? normalizeVisitTimeValue(this.usageEnd).substring(0, 10) + ' 23:59:59' : null
getUsageDetails({ start: st, end: et, material: row.material_id, department: row.department_id }).then(ret => { getUsageDetails({ start: st, end: et, material: row.material_id, department: row.department_id }).then(ret => {
if (ret.data && ret.data.errcode === 0) this.detailModal.rows = ret.data.data || [] if (ret.data && ret.data.errcode === 0) this.detailModal.rows = ret.data.data || []
else this.$Notice.error({ title: '查询失败', desc: ret.data && ret.data.errmsg }) else this.$Notice.error({ title: '查询失败', desc: ret.data && ret.data.errmsg })
...@@ -141,17 +141,17 @@ export default { ...@@ -141,17 +141,17 @@ export default {
loadWorkload () { loadWorkload () {
this.loading.workload = true this.loading.workload = true
const st = this.workStart ? normalizeVisitTimeValue(this.workStart) : null const st = this.workStart ? normalizeVisitTimeValue(this.workStart) : null
const et = this.workEnd ? normalizeVisitTimeValue(this.workEnd) : null const et = this.workEnd ? normalizeVisitTimeValue(this.workEnd).substring(0, 10) + ' 23:59:59' : null
const params = { start: st, end: et } const params = { start: st, end: et }
getWorkloadStats(params).then(ret => { getWorkloadStats(params).then(ret => {
if (ret.data && ret.data.errcode === 0) this.tables.workload = ret.data.data || [] if (ret.data && ret.data.errcode === 0) this.tables.workload = ret.data.data || []
else this.$Notice.error({ title: '查询失败', desc: ret.data && ret.data.errmsg }) else this.$Notice.error({ title: '查询失败', desc: ret.data && ret.data.errmsg })
}).finally(() => { this.loading.workload = false }) }).finally(() => { this.loading.workload = false })
}, },
resetWorkload () { this.workStart = null; this.workEnd = null; this.tables.workload = [] }, resetWorkload () { this.workStart = null; this.workEnd = null; this.tables.workload = []; this.loadWorkload() },
openWorkloadDetail (row, type) { openWorkloadDetail (row, type) {
const st = this.workStart ? normalizeVisitTimeValue(this.workStart) : null const st = this.workStart ? normalizeVisitTimeValue(this.workStart) : null
const et = this.workEnd ? normalizeVisitTimeValue(this.workEnd) : null const et = this.workEnd ? normalizeVisitTimeValue(this.workEnd).substring(0, 10) + ' 23:59:59' : null
if (type === 'leave') { if (type === 'leave') {
this.detailModal.columns = [ this.detailModal.columns = [
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论