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

feat: 新增项目列表

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