Commit c0a4946e authored by 黄奎's avatar 黄奎

页面修改

parent 167e031f
import request from '../../utils/request'
/**
* 获取供应商分页列表
*/
......
<template>
<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-3">
<q-input ref="filter" filled v-model="keyWords" label="系列名称">
<q-input ref="filter" filled v-model="msg.Name" label="供应商名称">
<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>
</q-input>
</div>
</div>
</div> -->
</div>
<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">
<template v-slot:top="props">
<div class="col-2 q-table__title">供应商信息</div>
<q-space />
<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>
</template>
<!-- <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.PageIndex" color="primary" :max="msg.PageCount"
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount"
:input="true" @input="changePage" />
</template> -->
</template>
</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>
</div>
</div>
......@@ -34,43 +34,60 @@
<script>
import {
queryCourseCategoryPage
} from '../../api/course/index'
querySupplierPage
} from '../../api/studyabroad/index'
import supplierForm from '../../components/studyAbroad/supplier-form'
export default {
meta: {
title: "供应商"
title: "供应商管理"
},
components: {
supplierForm,
},
data() {
return {
msg:{
Id:0,
Type:1, //供应商类型
Name:'' //供应商名称
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
Name: '' //供应商名称
},
PageCount: 0, //总页数
data: [],
keyWords: '',
isShowCategory: false,
isShow: false,
categoryObj: {},
loading:true,
columns: [
{
name: 'Type',
label: '供应商类型',
field: 'Type',
align: 'left'
},
{
isShowSupplier: false, //是否显示供应商弹窗
supplierObj: {}, //供应商对象
loading: true,
columns: [{
name: 'Name',
label: '供应商名称',
align: 'left',
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',
label: '操作',
......@@ -79,45 +96,40 @@
],
}
},
mounted() {
this.currentUrl = this.$route.path
this.getcoursecategorytree()
this.getsupplierpage()
},
methods: {
changePage(val) {
this.msg.PageIndex = val;
this.getcoursecategorytree()
this.msg.pageIndex = val;
this.getsupplierpage()
},
//刷新页面
refreshPage() {
this.getcoursecategorytree();
this.getsupplierpage();
},
//获取课程分类树形结构
getcoursecategorytree() {
this.isShow = false;
queryCourseCategoryPage({
PageSize:this.msg.PageSize,
PageIndex:this.msg.PageIndex
}).then(res => {
this.isShow = true;
this.loading=false;
//获取供应商分页列表
getsupplierpage() {
this.loading = true;
querySupplierPage(this.msg).then(res => {
this.loading = false;
this.data = res.Data.PageData;
this.msg.PageCount=res.Data.PageCount
this.PageCount = res.Data.PageCount
})
},
//新增修改角色
EditCategory(obj) {
//新增修改供应商
EditSupplier(obj) {
if (obj) {
this.categoryObj = obj
this.supplierObj = obj
} else {
this.categoryObj = null
this.supplierObj = null
}
this.isShowCategory = true;
this.isShowSupplier = true;
},
//关闭弹窗
closeCagegoryForm() {
this.isShowCategory = false
closeSupplierForm() {
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