增加历史查询

This commit is contained in:
龙运模 2024-11-29 21:34:37 +08:00
parent 5bb07240f4
commit fce26e7766
6 changed files with 133 additions and 14 deletions

View File

@ -139,7 +139,7 @@ export default {
customerMyQuery:{
url: `${config.API_URL}/customer.my.query`,
name: "我的记录查询(查询所有记录)",
post: async function(data){
get: async function(data){
return await http.post(this.url, data);
}
},
@ -150,6 +150,15 @@ export default {
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:{
url: `${config.API_URL}/customer.random.recommendation`,
name: "随机推荐",

View File

@ -13,7 +13,7 @@
<div class="describe">
<el-icon size="56" v-if="item.icon"><component :is="item.icon"/></el-icon>
<div class="name">
占位占位占位占位占位占位占位占位占位占位占位占位占位占位
占位占位占位
<el-icon class="icon" size="30"><sc-icon-ArrowRightServe/></el-icon>
</div>
</div>

View 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>

View File

@ -24,11 +24,13 @@
<script>
import {defineAsyncComponent} from "vue";
import {eventBus} from "@/utils/eventBus";
export default {
name: "personalCenter",
components:{
editAccount: defineAsyncComponent(() => import('./components/editAccount')),
companyDetail: defineAsyncComponent(() => import('./components/companyDetail')),
queryHistory: defineAsyncComponent(() => import('./components/queryHistory')),
product: defineAsyncComponent(() => import('./components/product')),
problem: defineAsyncComponent(() => import('./components/problem')),
feedback: defineAsyncComponent(() => import('./components/feedback')),
@ -50,6 +52,11 @@ export default {
title: "更新公司信息",
component: "companyDetail"
},
{
icon: "sc-icon-See",
title: "查找历史记录",
component: "queryHistory"
},
]
},
{
@ -76,12 +83,20 @@ export default {
}
},
mounted() {
//
eventBus.$on('userBack', this.getQueryBack);
},
beforeUnmount() {
unmounted() {
//
eventBus.$off('userBack', this.getQueryBack);
},
methods:{
getQueryBack(res){
console.log(res,366)
this.$nextTick(()=>{
this.page = res.name;
})
},
openPage(item){
this.page = item.index
},

View File

@ -26,13 +26,10 @@
</div>
</div>
<div class="menuIcon">
<div class="panel-item">
<div class="panel-item" @click="linkSee">
<el-icon><sc-icon-See /></el-icon>
</div>
<div class="panel-item" v-if="!userId">
<el-icon><sc-icon-User /></el-icon>
</div>
<div class="panel-item" v-if="userId">
<div class="panel-item">
<el-dropdown trigger="click" placement="bottom-start" ref="userDropdown">
<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>
@ -122,9 +119,18 @@ export default {
eventBus.$emit('queryBack',{name:'order'});
}
},
linkSee(){
eventBus.$emit('headerRouterBack',{name:'personalCenter'});
this.$nextTick(()=>{
eventBus.$emit('userBack',{name:'queryHistory'});
})
},
linkUser(){
this.$refs.userDropdown.handleClose();
eventBus.$emit('headerRouterBack',{name:'personalCenter'});
this.$nextTick(()=>{
eventBus.$emit('userBack',{name:'editAccount'});
})
},
clearCache(){
this.$confirm('清除缓存会将系统初始化,包括登录状态、主题、语言设置等,是否继续?', '警告', {

View File

@ -4,7 +4,7 @@
<el-main class="serveMain">
<div class="searchMain searchMainNoTop">
<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 class="searchItem searchBtn">
<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:'repair_order_no',width:200,hide: false},
{label:'业务状态',prop:'business_status',width:120,hide: false},
{label:'维保到期日期',prop:'warranty_end_date',width:200,hide: false},
{label:'客户名称',prop:'customer_name',hide: false},
{label:'维保到期日期',prop:'warranty_end_date',hide: false},
],
},
keyword:"",
params:{
serial_number:{
operator:"like",
@ -63,6 +63,9 @@ export default {
},
methods:{
upSearch(){
for(let i in this.params){
this.params[i].value = this.keyword===""?"":"%"+this.keyword+"%";
}
this.$refs.table.upData(this.params);
},
async getStatusList() {
@ -76,5 +79,5 @@ export default {
</script>
<style scoped lang="scss">
.textInput{width: 200px;}
</style>