parent
6d821998c1
commit
60b9c7fed3
@ -0,0 +1 @@ |
||||
export default '/doc' |
||||
@ -0,0 +1,8 @@ |
||||
import request from "@/config/request" |
||||
import BASE from './baseUrl' |
||||
|
||||
export const baseUrl = `${BASE}/history` |
||||
|
||||
export function searchHistory(data) { |
||||
return request.post(`${baseUrl}/search`, data).then(({data}) => data.data) |
||||
} |
||||
@ -1,6 +1,7 @@ |
||||
import request from "@/config/request" |
||||
import BASE from '../baseUrl' |
||||
|
||||
export const baseUrl = '/document/purchase/inbound' |
||||
export const baseUrl = `${BASE}/purchase/inbound` |
||||
|
||||
export function getById(id) { |
||||
return request.get(`${baseUrl}/getById?id=${id}`).then(({data}) => data.data) |
||||
@ -1,6 +1,7 @@ |
||||
import request from "@/config/request" |
||||
import BASE from '../baseUrl' |
||||
|
||||
export const baseUrl = `/document/sell/order` |
||||
export const baseUrl = `${BASE}/purchase/order` |
||||
|
||||
export function getById(id) { |
||||
return request.get(`${baseUrl}/getById?id=${id}`).then(({data}) => data.data) |
||||
@ -1,6 +1,7 @@ |
||||
import request from "@/config/request" |
||||
import BASE from '../baseUrl' |
||||
|
||||
export const baseUrl = '/document/purchase/order' |
||||
export const baseUrl = `${BASE}/sell/order` |
||||
|
||||
export function getById(id) { |
||||
return request.get(`${baseUrl}/getById?id=${id}`).then(({data}) => data.data) |
||||
@ -1,6 +1,7 @@ |
||||
import request from "@/config/request" |
||||
import BASE from '../baseUrl' |
||||
|
||||
export const baseUrl = `/document/sell/outbound` |
||||
export const baseUrl = `${BASE}/sell/outbound` |
||||
|
||||
export function getById(id) { |
||||
return request.get(`${baseUrl}/getById?id=${id}`).then(({data}) => data.data) |
||||
@ -1,7 +0,0 @@ |
||||
import request from "@/config/request" |
||||
|
||||
export const baseUrl = '/document/history' |
||||
|
||||
export function getDocumentHistoryByPid(pid) { |
||||
return request.get(`${baseUrl}/get?pid=${pid}`).then(({data}) => data.data) |
||||
} |
||||
@ -0,0 +1 @@ |
||||
export default '/message' |
||||
@ -0,0 +1 @@ |
||||
export default '/system' |
||||
@ -1,65 +0,0 @@ |
||||
<template> |
||||
<collapse-card header="单据历史" style="margin-top: 16px"> |
||||
<abstract-table v-loading="loading" :data="data" :highlight-current-row="false"> |
||||
<el-table-column align="center" label="#" type="index" width="80"/> |
||||
<el-table-column align="center" label="操作人" prop="uname"/> |
||||
<el-table-column align="center" label="操作类型" prop="type"/> |
||||
<el-table-column align="center" label="时 间" prop="time"/> |
||||
<el-table-column align="center" label="备注" prop="info"/> |
||||
</abstract-table> |
||||
</collapse-card> |
||||
</template> |
||||
|
||||
<script> |
||||
import AbstractTable from "@/components/AbstractTable" |
||||
import CollapseCard from '@/components/CollapseCard' |
||||
import {getDocumentHistoryByPid} from "@/api/documentHistory" |
||||
import {isEmpty, timeFormat} from "@/utils" |
||||
|
||||
export default { |
||||
name: "DocHistory", |
||||
|
||||
components: {AbstractTable, CollapseCard}, |
||||
|
||||
props: {id: String}, |
||||
|
||||
data() { |
||||
return { |
||||
loading: false, |
||||
data: [] |
||||
} |
||||
}, |
||||
|
||||
watch: { |
||||
id: { |
||||
immediate: true, |
||||
handler(v) { |
||||
if (isEmpty(v)) return |
||||
getDocumentHistoryByPid(v) |
||||
.then(history => { |
||||
history.forEach(i => { |
||||
i.time = timeFormat(null, new Date(i.time)) |
||||
let type = null |
||||
switch (i.type) { |
||||
case 0: |
||||
type = '撤回' |
||||
break |
||||
case 1: |
||||
type = '提交' |
||||
break |
||||
case 2: |
||||
type = '通过' |
||||
break |
||||
case 3: |
||||
type = '驳回' |
||||
break |
||||
} |
||||
i.type = type |
||||
}) |
||||
this.data = history |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
@ -1,25 +0,0 @@ |
||||
<script type="text/jsx"> |
||||
export default { |
||||
name: "DocSteps", |
||||
|
||||
functional: true, |
||||
|
||||
props: { |
||||
status: Number, |
||||
finish: Number |
||||
}, |
||||
|
||||
render(h, context) { |
||||
const {status, finish} = context.props |
||||
const active = status === 2 && (finish === undefined || finish === 2) ? 4 : status |
||||
return ( |
||||
<el-steps align-center active={active}> |
||||
<el-step title="填写单据"/> |
||||
<el-step title="提交单据,等待审核"/> |
||||
<el-step title="审核通过"/> |
||||
<el-step title="单据完成"/> |
||||
</el-steps> |
||||
) |
||||
} |
||||
} |
||||
</script> |
||||
@ -0,0 +1,96 @@ |
||||
<template> |
||||
<collapse-card header="单据历史" style="margin-top: 16px"> |
||||
<abstract-table v-loading="loading" :data="data" :highlight-current-row="false"> |
||||
<el-table-column align="center" label="#" type="index" width="80"/> |
||||
<el-table-column align="center" label="操作人" prop="uname"/> |
||||
<el-table-column align="center" label="操作类型" prop="type"/> |
||||
<el-table-column align="center" label="时 间" prop="time"/> |
||||
<el-table-column align="center" label="备注" prop="info"/> |
||||
</abstract-table> |
||||
|
||||
<el-pagination |
||||
background |
||||
:current-page="searchForm.page" |
||||
:page-size="searchForm.pageSize" |
||||
:total="searchForm.total" |
||||
hide-on-single-page |
||||
layout="total, prev, pager, next, jumper" |
||||
@current-change="pageChange" |
||||
/> |
||||
</collapse-card> |
||||
</template> |
||||
|
||||
<script> |
||||
import AbstractTable from "@/components/AbstractTable" |
||||
import CollapseCard from '@/components/CollapseCard' |
||||
import {searchHistory} from "@/api/doc/history" |
||||
import {isEmpty, timeFormat} from "@/utils" |
||||
|
||||
export default { |
||||
name: "DocHistory", |
||||
|
||||
components: {AbstractTable, CollapseCard}, |
||||
|
||||
props: {id: String}, |
||||
|
||||
data() { |
||||
return { |
||||
loading: false, |
||||
searchForm: { |
||||
page: 1, |
||||
pageSize: 15, |
||||
total: 0 |
||||
}, |
||||
data: [] |
||||
} |
||||
}, |
||||
|
||||
watch: { |
||||
id: { |
||||
immediate: true, |
||||
handler() { |
||||
this.search() |
||||
} |
||||
} |
||||
}, |
||||
|
||||
methods: { |
||||
search() { |
||||
if (isEmpty(this.id)) return |
||||
searchHistory({pid: this.id, ...this.searchForm}) |
||||
.then(({total, list}) => { |
||||
this.transformData(list) |
||||
this.data = list |
||||
this.total = total |
||||
}) |
||||
}, |
||||
|
||||
pageChange(v) { |
||||
this.searchForm.page = v |
||||
this.search() |
||||
}, |
||||
|
||||
transformData(data) { |
||||
data.forEach(i => { |
||||
i.time = timeFormat(null, new Date(i.time)) |
||||
let type = null |
||||
switch (i.type) { |
||||
case 0: |
||||
type = '撤回' |
||||
break |
||||
case 1: |
||||
type = '提交' |
||||
break |
||||
case 2: |
||||
type = '通过' |
||||
break |
||||
case 3: |
||||
type = '驳回' |
||||
break |
||||
} |
||||
i.type = type |
||||
}) |
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
@ -0,0 +1,22 @@ |
||||
<script type="text/jsx"> |
||||
export default { |
||||
name: "DocSteps", |
||||
|
||||
functional: true, |
||||
|
||||
props: {status: Number, finish: Number}, |
||||
|
||||
render(h, context) { |
||||
const {status, finish} = context.props |
||||
const active = status === 2 && (finish === undefined || finish === 2) ? 4 : status |
||||
return ( |
||||
<el-steps align-center active={active === 2 ? 3 : active}> |
||||
<el-step title="填写单据"/> |
||||
<el-step title="提交单据,等待审核"/> |
||||
<el-step title="审核通过"/> |
||||
<el-step title="单据完成"/> |
||||
</el-steps> |
||||
) |
||||
} |
||||
} |
||||
</script> |
||||
Loading…
Reference in new issue