Commit 00ac51a9 by wangchunyang

用品管理样式和时间调整

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