1
This commit is contained in:
parent
11736fa216
commit
03c860ae5c
@ -135,7 +135,27 @@
|
|||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="todoList">
|
<view class="todoList">
|
||||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
<view class="body-top-tab" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||||
|
<view class="body-top-tab-item">
|
||||||
|
<picker @change="bindCusFromChange" :value="cusFromIndex" :range="cusFromList">
|
||||||
|
<view class="uni-input">{{cusFromList[cusFromIndex]}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="body-top-tab-item">
|
||||||
|
<picker @change="bindRepairTypeChange" :value="repairTypeIndex" :range="repairTypeList">
|
||||||
|
<view class="uni-input">{{repairTypeList[repairTypeIndex]}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')" scroll-y="true" style="height: calc(100% - 50px)" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
|
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||||
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<scroll-view v-else scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @doVoid="doVoidReq" @getOrder="openFile" @startWork="startWork" @addProj="addProj"></order-card>
|
||||||
<view style="text-align: center" v-if="orderList.length==0">
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
@ -195,7 +215,9 @@ import {
|
|||||||
getStrData,
|
getStrData,
|
||||||
getTenantId,
|
getTenantId,
|
||||||
setJSONData,
|
setJSONData,
|
||||||
getJSONData
|
getJSONData,
|
||||||
|
getStorageWithExpiry,
|
||||||
|
setStorageWithExpiry
|
||||||
} from '@/utils/auth'
|
} from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -284,6 +306,18 @@ export default {
|
|||||||
companyInfo:{},
|
companyInfo:{},
|
||||||
//日期默认选中范围
|
//日期默认选中范围
|
||||||
range: ['2021-02-01', '2021-03-28'],
|
range: ['2021-02-01', '2021-03-28'],
|
||||||
|
//维修项目可选值
|
||||||
|
repairTypeList:['按维修类别'],
|
||||||
|
//维修项目可选值--值
|
||||||
|
repairTypeValueList:[''],
|
||||||
|
// 维修项目选中下标
|
||||||
|
repairTypeIndex:0,
|
||||||
|
//客户来源可选值
|
||||||
|
cusFromList:['按客户来源'],
|
||||||
|
//客户来源可选值---值
|
||||||
|
cusFromValueList:[''],
|
||||||
|
// 客户来源选中下标
|
||||||
|
cusFromIndex:0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -301,6 +335,9 @@ export default {
|
|||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
this.companyInfo = getJSONData("companyInfo")
|
this.companyInfo = getJSONData("companyInfo")
|
||||||
|
//查2个数据字典备用---客户注册方式-cus_sign_type、维修业务分类-repair_type
|
||||||
|
this.initDict("repair_type")
|
||||||
|
this.initDict("cus_sign_type")
|
||||||
if(!this.$msgSocket){
|
if(!this.$msgSocket){
|
||||||
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
this.$startMsgSocket(getTenantId(),getStrData("userId"))
|
||||||
}
|
}
|
||||||
@ -333,6 +370,59 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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){
|
maskClick(e){
|
||||||
console.log('maskClick事件:', e);
|
console.log('maskClick事件:', e);
|
||||||
},
|
},
|
||||||
@ -727,7 +817,7 @@ export default {
|
|||||||
* 查本人待处理工单
|
* 查本人待处理工单
|
||||||
*/
|
*/
|
||||||
getOrderList(){
|
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({
|
request({
|
||||||
url: '/admin-api/repair/tickets/pageType',
|
url: '/admin-api/repair/tickets/pageType',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
@ -1115,7 +1205,7 @@ export default {
|
|||||||
.todoList {
|
.todoList {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: 20rpx;
|
//row-gap: 20rpx;
|
||||||
height: 98%;
|
height: 98%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1210,6 +1300,12 @@ export default {
|
|||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
margin: 0 32rpx;
|
margin: 0 32rpx;
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 2rpx;
|
||||||
|
height: 60rpx;
|
||||||
|
background-color: #DDDDDD;
|
||||||
|
}
|
||||||
|
|
||||||
.body-top-tab-item {
|
.body-top-tab-item {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 0;
|
width: 0;
|
||||||
@ -1299,5 +1395,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -189,7 +189,7 @@
|
|||||||
.tabItem {
|
.tabItem {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
z-index: 9999999;
|
//z-index: 9999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
@ -203,7 +203,7 @@ export default {
|
|||||||
.tabItem {
|
.tabItem {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
z-index: 9999999;
|
//z-index: 9999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
@ -17,7 +17,27 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="orderList" v-if="!isRepairWarehouse">
|
<view class="orderList" v-if="!isRepairWarehouse">
|
||||||
<scroll-view scroll-y="true" style="height: 100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
<view class="body-top-tab" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||||
|
<view class="body-top-tab-item">
|
||||||
|
<picker @change="bindCusFromChange" :value="cusFromIndex" :range="cusFromList">
|
||||||
|
<view class="uni-input">{{cusFromList[cusFromIndex]}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<view class="line"></view>
|
||||||
|
<view class="body-top-tab-item">
|
||||||
|
<picker @change="bindRepairTypeChange" :value="repairTypeIndex" :range="repairTypeList">
|
||||||
|
<view class="uni-input">{{repairTypeList[repairTypeIndex]}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<scroll-view v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')" scroll-y="true" style="height: calc(100% - 50px)" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
|
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
|
||||||
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
|
<image class="" src="@/static/images/nothing.png" ></image>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
<scroll-view v-else scroll-y="true" style="height:100%" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
|
<order-card :userInfo="userInfo" v-for="(item, index) in orderList" :key="index" :order="item" @childEvent="onRefresherrefresh" @startWork="startWork"></order-card>
|
||||||
<view style="text-align: center" v-if="orderList.length==0">
|
<view style="text-align: center" v-if="orderList.length==0">
|
||||||
@ -50,7 +70,9 @@ import {
|
|||||||
getToken,
|
getToken,
|
||||||
getUserInfo,
|
getUserInfo,
|
||||||
getStrData,
|
getStrData,
|
||||||
getTenantId
|
getTenantId,
|
||||||
|
getStorageWithExpiry,
|
||||||
|
setStorageWithExpiry
|
||||||
} from '@/utils/auth'
|
} from '@/utils/auth'
|
||||||
import RepairSoCard from "@/components/repairSoCard.vue";
|
import RepairSoCard from "@/components/repairSoCard.vue";
|
||||||
|
|
||||||
@ -87,9 +109,21 @@ export default {
|
|||||||
],
|
],
|
||||||
repairSoList: [],
|
repairSoList: [],
|
||||||
userInfo:{},
|
userInfo:{},
|
||||||
|
//维修项目可选值
|
||||||
|
repairTypeList:['按维修类别'],
|
||||||
|
//维修项目可选值--值
|
||||||
|
repairTypeValueList:[''],
|
||||||
|
// 维修项目选中下标
|
||||||
|
repairTypeIndex:0,
|
||||||
|
//客户来源可选值
|
||||||
|
cusFromList:['按客户来源'],
|
||||||
|
//客户来源可选值---值
|
||||||
|
cusFromValueList:[''],
|
||||||
|
// 客户来源选中下标
|
||||||
|
cusFromIndex:0,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onShow() {
|
onLoad(){
|
||||||
if(!getToken()){
|
if(!getToken()){
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
@ -106,10 +140,74 @@ export default {
|
|||||||
]
|
]
|
||||||
this.isRepairWarehouse = true
|
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()
|
this.onRefresherrefresh()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
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(){
|
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)
|
console.log("this.searchText",this.searchText)
|
||||||
if(''!=this.searchText){
|
if(''!=this.searchText){
|
||||||
paramsObj['ticketNo'] = this.searchText
|
paramsObj['ticketNo'] = this.searchText
|
||||||
@ -333,6 +431,41 @@ export default {
|
|||||||
overflow: auto;
|
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 {
|
.tabList {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
@ -343,7 +476,7 @@ export default {
|
|||||||
.tabItem {
|
.tabItem {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
z-index: 9999999;
|
//z-index: 9999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
@ -371,7 +504,6 @@ export default {
|
|||||||
height: calc(100% - 90rpx);
|
height: calc(100% - 90rpx);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
row-gap: 20rpx;
|
|
||||||
|
|
||||||
.orderItem {
|
.orderItem {
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@
|
|||||||
.tabItem {
|
.tabItem {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
z-index: 9999999;
|
//z-index: 9999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
@ -219,7 +219,7 @@
|
|||||||
.tabItem {
|
.tabItem {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
z-index: 9999999;
|
//z-index: 9999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
@ -282,7 +282,7 @@ export default {
|
|||||||
.tabItem {
|
.tabItem {
|
||||||
padding: 30rpx;
|
padding: 30rpx;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
z-index: 9999999;
|
//z-index: 9999999;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
Loading…
Reference in New Issue
Block a user