Commit c0a4946e authored by 黄奎's avatar 黄奎

页面修改

parent 167e031f
import request from '../../utils/request'
/** /**
* 获取供应商分页列表 * 获取供应商分页列表
*/ */
......
<template> <template>
<div class="page-body"> <div class="page-body">
<!-- <div class="page-search row items-center"> <div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md"> <div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3"> <div class="col-3">
<q-input ref="filter" filled v-model="keyWords" label="系列名称"> <q-input ref="filter" filled v-model="msg.Name" label="供应商名称">
<template v-slot:append> <template v-slot:append>
<q-icon v-if="keyWords !== ''" name="clear" class="cursor-pointer" @click="resetFilter" /> <q-icon v-if="msg.Name !== ''" name="clear" class="cursor-pointer" @click="resetFilter" />
</template> </template>
</q-input> </q-input>
</div> </div>
</div> </div>
</div> --> </div>
<div class="page-content"> <div class="page-content">
<q-table :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table" <q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name"> separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props"> <template v-slot:top="props">
<div class="col-2 q-table__title">供应商信息</div> <div class="col-2 q-table__title">供应商信息</div>
<q-space /> <q-space />
<div class="page-option"> <div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增供应商" @click="EditCategory(null)" /> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增供应商" @click="EditSupplier(null)" />
</div> </div>
</template> </template>
<!-- <template v-slot:bottom> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.PageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
</template> --> </template>
</q-table> </q-table>
<supplier-form v-if="isShowCategory" :save-obj="categoryObj" @close="closeCagegoryForm" @success="refreshPage"> <supplier-form v-if="isShowSupplier" :save-obj="supplierObj" @close="closeSupplierForm" @success="refreshPage">
</supplier-form> </supplier-form>
</div> </div>
</div> </div>
...@@ -34,43 +34,60 @@ ...@@ -34,43 +34,60 @@
<script> <script>
import { import {
queryCourseCategoryPage querySupplierPage
} from '../../api/course/index' } from '../../api/studyabroad/index'
import supplierForm from '../../components/studyAbroad/supplier-form' import supplierForm from '../../components/studyAbroad/supplier-form'
export default { export default {
meta: { meta: {
title: "供应商" title: "供应商管理"
}, },
components: { components: {
supplierForm, supplierForm,
}, },
data() { data() {
return { return {
msg:{ msg: {
Id:0, pageIndex: 1,
Type:1, //供应商类型 pageSize: 10,
Name:'' //供应商名称 rowsPerPage: 10,
Name: '' //供应商名称
}, },
PageCount: 0, //总页数
data: [], data: [],
keyWords: '', isShowSupplier: false, //是否显示供应商弹窗
isShowCategory: false, supplierObj: {}, //供应商对象
isShow: false, loading: true,
categoryObj: {}, columns: [{
loading:true,
columns: [
{
name: 'Type',
label: '供应商类型',
field: 'Type',
align: 'left'
},
{
name: 'Name', name: 'Name',
label: '供应商名称', label: '供应商名称',
align: 'left', align: 'left',
field: 'Name' field: 'Name'
}, },
{
name: 'LinkMan',
label: '联系人',
align: 'left',
field: 'LinkMan'
},
{
name: 'LinkTel',
label: '联系电话',
align: 'left',
field: 'LinkTel'
},
{
name: 'LinkAddress',
label: '地址',
align: 'left',
field: 'LinkAddress'
},
{
name: 'Remark',
label: '备注',
align: 'left',
field: 'Remark'
},
{ {
name: 'CateId', name: 'CateId',
label: '操作', label: '操作',
...@@ -79,45 +96,40 @@ ...@@ -79,45 +96,40 @@
], ],
} }
}, },
mounted() { mounted() {
this.currentUrl = this.$route.path this.currentUrl = this.$route.path
this.getcoursecategorytree() this.getsupplierpage()
}, },
methods: { methods: {
changePage(val) { changePage(val) {
this.msg.PageIndex = val; this.msg.pageIndex = val;
this.getcoursecategorytree() this.getsupplierpage()
}, },
//刷新页面 //刷新页面
refreshPage() { refreshPage() {
this.getcoursecategorytree(); this.getsupplierpage();
}, },
//获取课程分类树形结构 //获取供应商分页列表
getcoursecategorytree() { getsupplierpage() {
this.isShow = false; this.loading = true;
queryCourseCategoryPage({ querySupplierPage(this.msg).then(res => {
PageSize:this.msg.PageSize, this.loading = false;
PageIndex:this.msg.PageIndex
}).then(res => {
this.isShow = true;
this.loading=false;
this.data = res.Data.PageData; this.data = res.Data.PageData;
this.msg.PageCount=res.Data.PageCount this.PageCount = res.Data.PageCount
}) })
}, },
//新增修改角色 //新增修改供应商
EditCategory(obj) { EditSupplier(obj) {
if (obj) { if (obj) {
this.categoryObj = obj this.supplierObj = obj
} else { } else {
this.categoryObj = null this.supplierObj = null
} }
this.isShowCategory = true; this.isShowSupplier = true;
}, },
//关闭弹窗 //关闭弹窗
closeCagegoryForm() { closeSupplierForm() {
this.isShowCategory = false this.isShowSupplier = false
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment