增加历史查询
This commit is contained in:
parent
5bb07240f4
commit
fce26e7766
@ -139,7 +139,7 @@ export default {
|
|||||||
customerMyQuery:{
|
customerMyQuery:{
|
||||||
url: `${config.API_URL}/customer.my.query`,
|
url: `${config.API_URL}/customer.my.query`,
|
||||||
name: "我的记录查询(查询所有记录)",
|
name: "我的记录查询(查询所有记录)",
|
||||||
post: async function(data){
|
get: async function(data){
|
||||||
return await http.post(this.url, data);
|
return await http.post(this.url, data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -150,6 +150,15 @@ export default {
|
|||||||
return await http.post(this.url, data);
|
return await http.post(this.url, data);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
searchTypeList:{
|
||||||
|
url: `${config.API_URL}/customer.search.type.list`,
|
||||||
|
name: "查询类别常量列表",
|
||||||
|
post: async function(data){
|
||||||
|
return await http.post(this.url, data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
recommendation:{
|
recommendation:{
|
||||||
url: `${config.API_URL}/customer.random.recommendation`,
|
url: `${config.API_URL}/customer.random.recommendation`,
|
||||||
name: "随机推荐",
|
name: "随机推荐",
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
<div class="describe">
|
<div class="describe">
|
||||||
<el-icon size="56" v-if="item.icon"><component :is="item.icon"/></el-icon>
|
<el-icon size="56" v-if="item.icon"><component :is="item.icon"/></el-icon>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
占位占位占位占位占位占位占位占位占位占位占位占位占位占位
|
占位占位占位
|
||||||
<el-icon class="icon" size="30"><sc-icon-ArrowRightServe/></el-icon>
|
<el-icon class="icon" size="30"><sc-icon-ArrowRightServe/></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
86
src/views/personalCenter/components/queryHistory.vue
Normal file
86
src/views/personalCenter/components/queryHistory.vue
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header class="serveTitle">维保期限信息查询</el-header>
|
||||||
|
<el-main class="serveMain">
|
||||||
|
<div class="searchMain searchMainNoTop">
|
||||||
|
<div class="searchItem">
|
||||||
|
<div class="name">关键字</div><el-input class="textInput" type="text" v-model="keyword" :size="size" clearable placeholder="请输入"></el-input>
|
||||||
|
</div>
|
||||||
|
<div class="searchItem searchBtn">
|
||||||
|
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mainTable">
|
||||||
|
<scTable class="serveTable" ref="table" :apiObj="list.apiObj" :column="list.column" :params="params" stripe :size="size">
|
||||||
|
<el-table-column type="index" label="序号"></el-table-column>
|
||||||
|
<template v-for="(item,index) in list.column" :key="index">
|
||||||
|
<el-table-column :label="item.label" :prop="item.prop" :width="item.width" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="item.prop === 'type'">
|
||||||
|
<span v-for="(em,index) in setMap.typeList" :key="index">
|
||||||
|
<span v-if="em.value === scope.row[item.prop]">{{em.label}}</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span v-else>{{scope.row[item.prop]}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
</scTable>
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "queryHistory",
|
||||||
|
data(){
|
||||||
|
return{
|
||||||
|
size:'small',
|
||||||
|
setMap:{
|
||||||
|
typeList:[]
|
||||||
|
},
|
||||||
|
list:{
|
||||||
|
apiObj: this.$API.customer.customerMyQuery,
|
||||||
|
column:[
|
||||||
|
{label:'问题类型',prop:'type',width:140,hide: false},
|
||||||
|
{label:'问题内容',prop:'content',hide: false},
|
||||||
|
{label:'日期',prop:'created_at',width:200,hide: false},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
keyword:"",
|
||||||
|
params:{
|
||||||
|
remark:{
|
||||||
|
operator:"like",
|
||||||
|
value:""
|
||||||
|
},
|
||||||
|
content:{
|
||||||
|
operator:"like",
|
||||||
|
value:""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getStatusList();
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
upSearch(){
|
||||||
|
for(let i in this.params){
|
||||||
|
this.params[i].value = this.keyword===""?"":"%"+this.keyword+"%";
|
||||||
|
}
|
||||||
|
this.$refs.table.upData(this.params);
|
||||||
|
},
|
||||||
|
async getStatusList() {
|
||||||
|
const res = await this.$API.customer.searchTypeList.post();
|
||||||
|
if(res.code === 200){
|
||||||
|
this.setMap.typeList = res.data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.textInput{width: 200px;}
|
||||||
|
</style>
|
||||||
@ -24,11 +24,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {defineAsyncComponent} from "vue";
|
import {defineAsyncComponent} from "vue";
|
||||||
|
import {eventBus} from "@/utils/eventBus";
|
||||||
export default {
|
export default {
|
||||||
name: "personalCenter",
|
name: "personalCenter",
|
||||||
components:{
|
components:{
|
||||||
editAccount: defineAsyncComponent(() => import('./components/editAccount')),
|
editAccount: defineAsyncComponent(() => import('./components/editAccount')),
|
||||||
companyDetail: defineAsyncComponent(() => import('./components/companyDetail')),
|
companyDetail: defineAsyncComponent(() => import('./components/companyDetail')),
|
||||||
|
queryHistory: defineAsyncComponent(() => import('./components/queryHistory')),
|
||||||
product: defineAsyncComponent(() => import('./components/product')),
|
product: defineAsyncComponent(() => import('./components/product')),
|
||||||
problem: defineAsyncComponent(() => import('./components/problem')),
|
problem: defineAsyncComponent(() => import('./components/problem')),
|
||||||
feedback: defineAsyncComponent(() => import('./components/feedback')),
|
feedback: defineAsyncComponent(() => import('./components/feedback')),
|
||||||
@ -50,6 +52,11 @@ export default {
|
|||||||
title: "更新公司信息",
|
title: "更新公司信息",
|
||||||
component: "companyDetail"
|
component: "companyDetail"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
icon: "sc-icon-See",
|
||||||
|
title: "查找历史记录",
|
||||||
|
component: "queryHistory"
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -76,12 +83,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
// 获取新消息
|
||||||
|
eventBus.$on('userBack', this.getQueryBack);
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
unmounted() {
|
||||||
|
// 获取新消息
|
||||||
|
eventBus.$off('userBack', this.getQueryBack);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
getQueryBack(res){
|
||||||
|
console.log(res,366)
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.page = res.name;
|
||||||
|
})
|
||||||
|
},
|
||||||
openPage(item){
|
openPage(item){
|
||||||
this.page = item.index
|
this.page = item.index
|
||||||
},
|
},
|
||||||
|
|||||||
@ -26,13 +26,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="menuIcon">
|
<div class="menuIcon">
|
||||||
<div class="panel-item">
|
<div class="panel-item" @click="linkSee">
|
||||||
<el-icon><sc-icon-See /></el-icon>
|
<el-icon><sc-icon-See /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-item" v-if="!userId">
|
<div class="panel-item">
|
||||||
<el-icon><sc-icon-User /></el-icon>
|
|
||||||
</div>
|
|
||||||
<div class="panel-item" v-if="userId">
|
|
||||||
<el-dropdown trigger="click" placement="bottom-start" ref="userDropdown">
|
<el-dropdown trigger="click" placement="bottom-start" ref="userDropdown">
|
||||||
<div class="user-avatar el-dropdown-link">
|
<div class="user-avatar el-dropdown-link">
|
||||||
<el-avatar :size="22" shape="circle" :src="this.$store.state.global.login_avatar"><span class="userName">{{ userNameF }}</span></el-avatar>
|
<el-avatar :size="22" shape="circle" :src="this.$store.state.global.login_avatar"><span class="userName">{{ userNameF }}</span></el-avatar>
|
||||||
@ -122,9 +119,18 @@ export default {
|
|||||||
eventBus.$emit('queryBack',{name:'order'});
|
eventBus.$emit('queryBack',{name:'order'});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
linkSee(){
|
||||||
|
eventBus.$emit('headerRouterBack',{name:'personalCenter'});
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
eventBus.$emit('userBack',{name:'queryHistory'});
|
||||||
|
})
|
||||||
|
},
|
||||||
linkUser(){
|
linkUser(){
|
||||||
this.$refs.userDropdown.handleClose();
|
this.$refs.userDropdown.handleClose();
|
||||||
eventBus.$emit('headerRouterBack',{name:'personalCenter'});
|
eventBus.$emit('headerRouterBack',{name:'personalCenter'});
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
eventBus.$emit('userBack',{name:'editAccount'});
|
||||||
|
})
|
||||||
},
|
},
|
||||||
clearCache(){
|
clearCache(){
|
||||||
this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?', '警告', {
|
this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?', '警告', {
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<el-main class="serveMain">
|
<el-main class="serveMain">
|
||||||
<div class="searchMain searchMainNoTop">
|
<div class="searchMain searchMainNoTop">
|
||||||
<div class="searchItem">
|
<div class="searchItem">
|
||||||
<div class="name">序列号</div> <el-input type="text" v-model="params.serial_number.value" :size="size" clearable placeholder="请输入序列号"></el-input>
|
<div class="name">序列号</div><el-input class="textInput" type="text" v-model="keyword" :size="size" clearable placeholder="请输入序列号"></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="searchItem searchBtn">
|
<div class="searchItem searchBtn">
|
||||||
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
<el-button :size="size" type="primary" icon="el-icon-search" @click="upSearch">查询</el-button>
|
||||||
@ -46,10 +46,10 @@ export default {
|
|||||||
{label:'序列号',prop:'serial_number',width:160,hide: false},
|
{label:'序列号',prop:'serial_number',width:160,hide: false},
|
||||||
{label:'工单号',prop:'repair_order_no',width:200,hide: false},
|
{label:'工单号',prop:'repair_order_no',width:200,hide: false},
|
||||||
{label:'业务状态',prop:'business_status',width:120,hide: false},
|
{label:'业务状态',prop:'business_status',width:120,hide: false},
|
||||||
{label:'维保到期日期',prop:'warranty_end_date',width:200,hide: false},
|
{label:'维保到期日期',prop:'warranty_end_date',hide: false},
|
||||||
{label:'客户名称',prop:'customer_name',hide: false},
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
keyword:"",
|
||||||
params:{
|
params:{
|
||||||
serial_number:{
|
serial_number:{
|
||||||
operator:"like",
|
operator:"like",
|
||||||
@ -63,6 +63,9 @@ export default {
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
upSearch(){
|
upSearch(){
|
||||||
|
for(let i in this.params){
|
||||||
|
this.params[i].value = this.keyword===""?"":"%"+this.keyword+"%";
|
||||||
|
}
|
||||||
this.$refs.table.upData(this.params);
|
this.$refs.table.upData(this.params);
|
||||||
},
|
},
|
||||||
async getStatusList() {
|
async getStatusList() {
|
||||||
@ -76,5 +79,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.textInput{width: 200px;}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user