提交 83324636 authored 作者: lihuihui's avatar lihuihui

feat: 新增项目列表

上级 040dd76d
...@@ -235,8 +235,8 @@ export default { ...@@ -235,8 +235,8 @@ export default {
let params = this.params let params = this.params
// 翻页参数设置 // 翻页参数设置
if (this.hasPagination) { if (this.hasPagination) {
params.page = (this.page.currentPage - 1).toString() params.page = (this.page.currentPage).toString()
params.page_size = this.page.size.toString() params['per-page'] = this.page.size.toString()
} }
// 接口请求之前 // 接口请求之前
if (beforeRequest) { if (beforeRequest) {
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
</el-select> </el-select>
</template> </template>
<el-row> <el-row>
<el-button type="primary">表头</el-button>
<el-button type="primary">更多筛选</el-button>
<el-button type="primary" @click="isShowdialog = true">分配票据跟进人</el-button> <el-button type="primary" @click="isShowdialog = true">分配票据跟进人</el-button>
</el-row> </el-row>
<template v-slot:billing-type="{ params }"> <template v-slot:billing-type="{ params }">
...@@ -80,6 +78,7 @@ export default { ...@@ -80,6 +78,7 @@ export default {
{ prop: 'invoice_type', slots: 'invoice-type' }, { prop: 'invoice_type', slots: 'invoice-type' },
{ prop: 'billing_type', slots: 'billing-type' } { prop: 'billing_type', slots: 'billing-type' }
], ],
columnsOptions: { key: 'invoices' },
columns: [ columns: [
{ label: '发票代码', prop: 'invoice_code', minWidth: 120 }, { label: '发票代码', prop: 'invoice_code', minWidth: 120 },
{ label: '发票号码', prop: 'invoice_num', minWidth: 120 }, { label: '发票号码', prop: 'invoice_num', minWidth: 120 },
......
...@@ -3,6 +3,6 @@ import httpRequest from '@/utils/axios' ...@@ -3,6 +3,6 @@ import httpRequest from '@/utils/axios'
/** /**
* 获取商品列表 * 获取商品列表
*/ */
export function getGoodsList(data) { export function getProjectList(params) {
return httpRequest.post('/api/shop/commodity/spu/search', data).then({}) return httpRequest.get('/api/finance/v1/projects/list', { params }).then({})
} }
...@@ -6,14 +6,7 @@ const routes = [ ...@@ -6,14 +6,7 @@ const routes = [
children: [ children: [
{ {
path: '', path: '',
component: () => import('./views/List.vue'), component: () => import('./views/List.vue')
meta: { title: '发票记录' }
},
{
name: 'invoiceView',
path: 'invoice/:id',
component: () => import('./views/Detail.vue'),
meta: { title: '发票详情' }
} }
] ]
} }
......
<template>
<div>12312</div>
</template>
<script>
export default {}
</script>
<style></style>
...@@ -17,100 +17,84 @@ ...@@ -17,100 +17,84 @@
import AppList from '@/components/base/AppList.vue' import AppList from '@/components/base/AppList.vue'
import AppCard from '@/components/base/AppCard.vue' import AppCard from '@/components/base/AppCard.vue'
// 接口 // 接口
// import { getGoodsList } from '../api' import { getProjectList } from '../api'
export default { export default {
components: { AppCard, AppList }, components: { AppCard, AppList },
data() { data() {
return { return {
invoiceTypeOption: [ projectType: [
{ value: '1', label: '1' }, { value: 1, label: '学位项目' },
{ value: '2', label: '2' }, { value: 2, label: '公开课项目' },
{ value: '3', label: '3' } { value: 3, label: '高级培训' },
{ value: 4, label: '职业教育' },
{ value: 5, label: '职业教育' }
], ],
billingTypeOption: [{ value: '1', label: '1' }] projectStatus: [
{ value: 0, label: '未上线' },
{ value: 1, label: '已上线' },
{ value: 9, label: '已下线' }
],
projectName: []
} }
}, },
computed: { computed: {
// 列表配置 // 列表配置
tableOptions() { tableOptions() {
const _this = this
return { return {
// remote: { remote: {
// httpRequest: getGoodsList, httpRequest: getProjectList,
// params: { shop_id: this.shopId, spu_id: '', spu_name: '', group_id: '', price_min: '', price_max: '' }, params: { name: '', project_type: '', project_status: '' }
// beforeRequest: this.beforeRequest // beforeRequest: this.beforeRequest
// }, },
filters: [ filters: [
{ {
type: 'select', type: 'input',
prop: 'group_id', prop: 'name',
options: this.groupList, placeholder: '项目名称/别名'
labelKey: 'group_name',
valueKey: 'group_id',
placeholder: '请选择'
}, },
{ {
type: 'select', type: 'select',
prop: 'group_id2', prop: 'project_type',
options: this.groupList, options: this.projectType,
labelKey: 'group_name', placeholder: '请选择项目类型'
valueKey: 'group_id',
placeholder: '请选择'
}, },
{ {
type: 'select', type: 'select',
prop: 'group_id3', prop: 'project_status',
options: this.groupList, options: this.projectStatus,
labelKey: 'group_name', placeholder: '请选择状态'
valueKey: 'group_id',
placeholder: '请选择'
} }
], ],
columns: [ columns: [
{ label: '项目编号', prop: 'invoice_code', minWidth: 120 }, { label: '项目编号', prop: 'project_id', minWidth: 50 },
{ label: '项目名称', prop: 'invoice_num', minWidth: 120 }, { label: '项目名称', prop: 'title', minWidth: 150 },
{ label: '显示别名', prop: 'name', minWidth: 100 }, { label: '显示别名', prop: 'alias' },
{ label: '项目类型', prop: 'number', minWidth: 100 },
{ label: '状态', prop: 'order', minWidth: 100 },
{ label: '更新时间', prop: 'data', minWidth: 100 }
],
data: [
{
invoice_code: '1',
invoice_num: '2016-05-02',
data1: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
order: '99832459873849'
},
{ {
invoice_code: '2', label: '项目类型',
invoice_num: '2016-05-04', prop: 'project_type',
data1: '2016-05-02', computed({ row }) {
name: '王小虎', const found = _this.projectType.find(item => { return item.value === parseInt(row.project_type) })
address: '上海市普陀区金沙江路 1517 弄', return found ? found.label : row.project_type
order: '99832459873849' }
}, },
{ {
invoice_code: '3', label: '状态',
invoice_num: '2016-05-01', prop: 'project_status',
data1: '2016-05-02', computed({ row }) {
name: '王小虎', const found = _this.projectStatus.find(item => { return item.value === parseInt(row.project_status) })
address: '上海市普陀区金沙江路 1519 弄', return found ? found.label : row.project_status
order: '99832459873849' }
}, },
{ { label: '更新时间', prop: 'updated_time', minWidth: 110 }
invoice_code: '4',
invoice_num: '2016-05-03',
data1: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄',
order: '99832459873849'
}
] ]
} }
} }
}, },
mounted() {
console.log(this.prijectName, '==123')
},
methods: { methods: {
dialogHide() { dialogHide() {
this.isShowdialog = false this.isShowdialog = false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论