From 03c860ae5c9a30ede01ff0db244238ec1c7f056c Mon Sep 17 00:00:00 2001 From: Vinjor Date: Mon, 18 Nov 2024 20:02:18 +0800 Subject: [PATCH] 1 --- pages-home/home/home.vue | 105 +++++++++++++++- pages-home/service/applyList.vue | 2 +- pages-order/inWare/inWare.vue | 2 +- pages-order/orderList/orderList.vue | 144 +++++++++++++++++++++- pages-repair/applyList/applyList-back.vue | 2 +- pages-repair/applyList/applyList.vue | 2 +- pages-repair/orderList/orderList.vue | 2 +- 7 files changed, 244 insertions(+), 15 deletions(-) diff --git a/pages-home/home/home.vue b/pages-home/home/home.vue index e063485..e14e7cb 100644 --- a/pages-home/home/home.vue +++ b/pages-home/home/home.vue @@ -135,7 +135,27 @@ - + + + {{cusFromList[cusFromIndex]}} + + + + + + {{repairTypeList[repairTypeIndex]}} + + + + + + + + + + @@ -195,7 +215,9 @@ import { getStrData, getTenantId, setJSONData, - getJSONData + getJSONData, + getStorageWithExpiry, + setStorageWithExpiry } from '@/utils/auth' export default { @@ -284,6 +306,18 @@ export default { companyInfo:{}, //日期默认选中范围 range: ['2021-02-01', '2021-03-28'], + //维修项目可选值 + repairTypeList:['按维修类别'], + //维修项目可选值--值 + repairTypeValueList:[''], + // 维修项目选中下标 + repairTypeIndex:0, + //客户来源可选值 + cusFromList:['按客户来源'], + //客户来源可选值---值 + cusFromValueList:[''], + // 客户来源选中下标 + cusFromIndex:0, } }, watch: { @@ -301,6 +335,9 @@ export default { }) }else{ this.companyInfo = getJSONData("companyInfo") + //查2个数据字典备用---客户注册方式-cus_sign_type、维修业务分类-repair_type + this.initDict("repair_type") + this.initDict("cus_sign_type") if(!this.$msgSocket){ this.$startMsgSocket(getTenantId(),getStrData("userId")) } @@ -333,6 +370,59 @@ export default { } }, methods: { + /** + * 切换客户来源 + */ + bindCusFromChange(e){ + this.cusFromIndex = e.detail.value + this.onRefresherrefresh() + }, + /** + * 切换维修项目类型 + */ + bindRepairTypeChange(e){ + this.repairTypeIndex = e.detail.value + this.onRefresherrefresh() + }, + /** + * 查2个数据字典备用---客户注册方式-cus_sign_type、维修业务分类-repair_type + */ + initDict(dictCode){ + let dictArray = getStorageWithExpiry(dictCode); + if(null==dictArray || undefined==dictArray){ + request({ + url: '/admin-api/system/dict-data/type', + method: 'get', + params:{type:dictCode} + }).then((res) => { + if (res.code == 200) { + setStorageWithExpiry(dictCode,res.data,3600) + this.$nextTick(()=>{ + res.data.map(item=>{ + this.setDictItem(dictCode,item) + }) + }) + } + }) + }else{ + this.$nextTick(()=>{ + dictArray.map(item=>{ + this.setDictItem(dictCode,item) + }) + }) + } + }, + setDictItem(dictCode,item){ + if("repair_type"==dictCode){ + //维修项目 + this.repairTypeList.push(item.label) + this.repairTypeValueList.push(item.value) + }else{ + //客户来源 + this.cusFromList.push(item.label) + this.cusFromValueList.push(item.value) + } + }, maskClick(e){ console.log('maskClick事件:', e); }, @@ -727,7 +817,7 @@ export default { * 查本人待处理工单 */ getOrderList(){ - let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0"} + let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0",cusFrom:this.cusFromValueList[this.cusFromIndex],repairType:this.repairTypeValueList[this.repairTypeIndex]} request({ url: '/admin-api/repair/tickets/pageType', method: 'get', @@ -1115,7 +1205,7 @@ export default { .todoList { display: flex; flex-direction: column; - row-gap: 20rpx; + //row-gap: 20rpx; height: 98%; } } @@ -1210,6 +1300,12 @@ export default { font-size: 30rpx; margin: 0 32rpx; + .line { + width: 2rpx; + height: 60rpx; + background-color: #DDDDDD; + } + .body-top-tab-item { flex: 1; width: 0; @@ -1299,5 +1395,6 @@ export default { } } } + } diff --git a/pages-home/service/applyList.vue b/pages-home/service/applyList.vue index 62632ff..da8a147 100644 --- a/pages-home/service/applyList.vue +++ b/pages-home/service/applyList.vue @@ -189,7 +189,7 @@ .tabItem { padding: 30rpx; flex: 1; - z-index: 9999999; + //z-index: 9999999; text-align: center; position: relative; font-size: 28rpx; diff --git a/pages-order/inWare/inWare.vue b/pages-order/inWare/inWare.vue index 2a8f338..75c6668 100644 --- a/pages-order/inWare/inWare.vue +++ b/pages-order/inWare/inWare.vue @@ -203,7 +203,7 @@ export default { .tabItem { padding: 30rpx; flex: 1; - z-index: 9999999; + //z-index: 9999999; text-align: center; position: relative; font-size: 24rpx; diff --git a/pages-order/orderList/orderList.vue b/pages-order/orderList/orderList.vue index a8ea724..b5c51e7 100644 --- a/pages-order/orderList/orderList.vue +++ b/pages-order/orderList/orderList.vue @@ -17,7 +17,27 @@ - + + + {{cusFromList[cusFromIndex]}} + + + + + + {{repairTypeList[repairTypeIndex]}} + + + + + + + + + + @@ -50,7 +70,9 @@ import { getToken, getUserInfo, getStrData, - getTenantId + getTenantId, + getStorageWithExpiry, + setStorageWithExpiry } from '@/utils/auth' import RepairSoCard from "@/components/repairSoCard.vue"; @@ -87,9 +109,21 @@ export default { ], repairSoList: [], userInfo:{}, + //维修项目可选值 + repairTypeList:['按维修类别'], + //维修项目可选值--值 + repairTypeValueList:[''], + // 维修项目选中下标 + repairTypeIndex:0, + //客户来源可选值 + cusFromList:['按客户来源'], + //客户来源可选值---值 + cusFromValueList:[''], + // 客户来源选中下标 + cusFromIndex:0, } }, - onShow() { + onLoad(){ if(!getToken()){ uni.reLaunch({ url: '/pages/login/login' @@ -106,10 +140,74 @@ export default { ] this.isRepairWarehouse = true } + //查2个数据字典备用---客户注册方式-cus_sign_type、维修业务分类-repair_type + this.initDict("repair_type") + this.initDict("cus_sign_type") + } + }, + onShow() { + if(!getToken()){ + uni.reLaunch({ + url: '/pages/login/login' + }) + }else{ this.onRefresherrefresh() } }, methods: { + /** + * 切换客户来源 + */ + bindCusFromChange(e){ + this.cusFromIndex = e.detail.value + this.onRefresherrefresh() + }, + /** + * 切换维修项目类型 + */ + bindRepairTypeChange(e){ + this.repairTypeIndex = e.detail.value + this.onRefresherrefresh() + }, + /** + * 查2个数据字典备用---客户注册方式-cus_sign_type、维修业务分类-repair_type + */ + initDict(dictCode){ + let dictArray = getStorageWithExpiry(dictCode); + if(null==dictArray || undefined==dictArray){ + request({ + url: '/admin-api/system/dict-data/type', + method: 'get', + params:{type:dictCode} + }).then((res) => { + if (res.code == 200) { + setStorageWithExpiry(dictCode,res.data,3600) + this.$nextTick(()=>{ + res.data.map(item=>{ + this.setDictItem(dictCode,item) + }) + }) + } + }) + }else{ + this.$nextTick(()=>{ + dictArray.map(item=>{ + this.setDictItem(dictCode,item) + }) + }) + } + }, + setDictItem(dictCode,item){ + if("repair_type"==dictCode){ + //维修项目 + this.repairTypeList.push(item.label) + this.repairTypeValueList.push(item.value) + }else{ + //客户来源 + this.cusFromList.push(item.label) + this.cusFromValueList.push(item.value) + } + }, /** * 上滑加载数据 */ @@ -197,7 +295,7 @@ export default { } }, getOrderList(){ - let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0"} + let paramsObj = {pageNo: this.pageNo, pageSize: this.pageSize, isFinish: "0",cusFrom:this.cusFromValueList[this.cusFromIndex],repairType:this.repairTypeValueList[this.repairTypeIndex]} console.log("this.searchText",this.searchText) if(''!=this.searchText){ paramsObj['ticketNo'] = this.searchText @@ -333,6 +431,41 @@ export default { overflow: auto; } + .body-top-tab { + display: flex; + font-size: 30rpx; + margin: 0 32rpx; + + .line { + width: 2rpx; + height: 60rpx; + background-color: #DDDDDD; + } + + .body-top-tab-item { + flex: 1; + width: 0; + text-align: center; + padding: 16rpx 20rpx; + position: relative; + + &.active { + color: #0174F6; + } + + .activeLine { + position: absolute; + bottom: 0; + left: 50%; + transform: translateX(-50%); + width: 96rpx; + height: 6rpx; + background: #0174F6; + border-radius: 4rpx 4rpx 0rpx 0rpx; + } + } + } + .tabList { background: #FFFFFF; border-radius: 12rpx 12rpx 12rpx 12rpx; @@ -343,7 +476,7 @@ export default { .tabItem { padding: 30rpx; flex: 1; - z-index: 9999999; + //z-index: 9999999; text-align: center; position: relative; font-size: 28rpx; @@ -371,7 +504,6 @@ export default { height: calc(100% - 90rpx); display: flex; flex-direction: column; - row-gap: 20rpx; .orderItem { } diff --git a/pages-repair/applyList/applyList-back.vue b/pages-repair/applyList/applyList-back.vue index 9c04fea..7928099 100644 --- a/pages-repair/applyList/applyList-back.vue +++ b/pages-repair/applyList/applyList-back.vue @@ -124,7 +124,7 @@ .tabItem { padding: 30rpx; flex: 1; - z-index: 9999999; + //z-index: 9999999; text-align: center; position: relative; font-size: 28rpx; diff --git a/pages-repair/applyList/applyList.vue b/pages-repair/applyList/applyList.vue index 5b936f9..c70c558 100644 --- a/pages-repair/applyList/applyList.vue +++ b/pages-repair/applyList/applyList.vue @@ -219,7 +219,7 @@ .tabItem { padding: 30rpx; flex: 1; - z-index: 9999999; + //z-index: 9999999; text-align: center; position: relative; font-size: 28rpx; diff --git a/pages-repair/orderList/orderList.vue b/pages-repair/orderList/orderList.vue index 5f99523..ddeb41e 100644 --- a/pages-repair/orderList/orderList.vue +++ b/pages-repair/orderList/orderList.vue @@ -282,7 +282,7 @@ export default { .tabItem { padding: 30rpx; flex: 1; - z-index: 9999999; + //z-index: 9999999; text-align: center; position: relative; font-size: 24rpx;