|
|
@@ -1,14 +1,8 @@
|
|
|
<template>
|
|
|
<view class="kd-work-container">
|
|
|
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="orderType == 1 ? '工单待办' : '工单已办'" right-icon="scan" @clickLeft="back" @clickRight="HandlScanCode">
|
|
|
+ <uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="orderType == 1 ? '工单待办' : '工单已办'" right-icon="scan" @clickLeft="back">
|
|
|
<view slot="right">
|
|
|
- <u-icon
|
|
|
- name="scan"
|
|
|
- color="#fff"
|
|
|
- size="60"
|
|
|
- :custom-style="{
|
|
|
- backgroundColor: '#157A2C'
|
|
|
- }"></u-icon>
|
|
|
+ <view @click="HandlScanCode" class="scan_btn"></view>
|
|
|
</view>
|
|
|
</uni-nav-bar>
|
|
|
<view class="top-wrapper">
|
|
|
@@ -23,17 +17,19 @@
|
|
|
fontWeight: 'bold'
|
|
|
}"></u-tabs>
|
|
|
</view>
|
|
|
- <image src="~@/static/moreSearch.svg" mode="" @click="moreSearch = !moreSearch"></image>
|
|
|
- <view class="slide-search">
|
|
|
+ <view class="more_search">
|
|
|
+ <image src="~@/static/moreSearch.svg" mode="" @click="searchShow = true"></image>
|
|
|
+ </view>
|
|
|
+ <!-- <view class="slide-search">
|
|
|
<view class="more-search" v-show="moreSearch">
|
|
|
<view class="cell">
|
|
|
<view class="label">编号</view>
|
|
|
<input type="text" placeholder="请输入" v-model="searchFrom.code" />
|
|
|
</view>
|
|
|
<view v-if="orderType == 1" class="cell">
|
|
|
- <view class="label">状态</view>
|
|
|
- <!-- <uni-data-select :key="activeType" :localdata="statusRange[activeType]" v-model="searchFrom.orderStatus"></uni-data-select> -->
|
|
|
- <u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30" @change="statusChange">
|
|
|
+ <view class="label">状态</view> -->
|
|
|
+ <!-- <uni-data-select :key="activeType" :localdata="statusRange[activeType]" v-model="searchFrom.orderStatus"></uni-data-select> -->
|
|
|
+ <!-- <u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30" @change="statusChange">
|
|
|
<u-checkbox
|
|
|
v-for="(item, index) in statusRange[activeType]"
|
|
|
:customStyle="{ marginRight: '8px' }"
|
|
|
@@ -43,17 +39,17 @@
|
|
|
iconSize="30"
|
|
|
activeColor="#157A2C"></u-checkbox>
|
|
|
</u-checkbox-group>
|
|
|
- </view>
|
|
|
- <!-- <view class="cell">
|
|
|
+ </view> -->
|
|
|
+ <!-- <view class="cell">
|
|
|
<view class="label">紧急程度</view>
|
|
|
<uni-data-select :localdata="doneRange" @change="doneChange" v-model="searchFrom.urgent" :clear="false"></uni-data-select>
|
|
|
</view> -->
|
|
|
- <view class="btn-search">
|
|
|
+ <!-- <view class="btn-search">
|
|
|
<button @click="reset">重置</button>
|
|
|
<button class="primary" @click="doSearch">搜索</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="work-list">
|
|
|
<u-list @scrolltolower="scrolltolower" :key="activeType" :preLoadScreen="page * 10">
|
|
|
@@ -66,10 +62,41 @@
|
|
|
</u-list-item>
|
|
|
</u-list>
|
|
|
</view>
|
|
|
+ <SearchPopup mode="top" v-if="searchShow">
|
|
|
+ <template v-slot:list>
|
|
|
+ <view class="search_list">
|
|
|
+ <u-form labelPosition="left" :model="formData" labelWidth="180" labelAlign="left" class="baseForm">
|
|
|
+ <u-form-item v-if="orderType == 1" label="类型:" class="required-form" borderBottom prop="assetType">
|
|
|
+ <u-checkbox-group v-model="searchFrom.orderStatus" placement="row" size="30" @change="statusChange">
|
|
|
+ <u-checkbox
|
|
|
+ v-for="(item, index) in statusRange[activeType]"
|
|
|
+ :customStyle="{ marginRight: '8px' }"
|
|
|
+ :label="item.text"
|
|
|
+ :name="item.value"
|
|
|
+ labelSize="30"
|
|
|
+ iconSize="30"
|
|
|
+ activeColor="#157A2C"></u-checkbox>
|
|
|
+ </u-checkbox-group>
|
|
|
+ </u-form-item>
|
|
|
+ <u-form-item label="编号:" class="required-form" borderBottom prop="assetType">
|
|
|
+ <input type="text" placeholder="请输入编号" v-model="searchFrom.code" />
|
|
|
+ </u-form-item>
|
|
|
+ </u-form>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <template v-slot:operate>
|
|
|
+ <view class="operate_box rx-bc">
|
|
|
+ <u-button size="small" class="u-reset-button mg-20" @click="searchShow = false">取消</u-button>
|
|
|
+ <u-button type="warning" size="small" class="u-reset-button mg-20" @click="reset">重置</u-button>
|
|
|
+ <u-button type="success" size="small" class="u-reset-button" @click="doSearch">确定</u-button>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </SearchPopup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import SearchPopup from '@/pages/pda/components/searchPopup.vue'
|
|
|
import { getWorkOrderList, statistics } from '@/api/myTicket'
|
|
|
import KdCard from '../components/KdCard/index.vue'
|
|
|
import CardTime from '../components/CardTime.vue'
|
|
|
@@ -80,10 +107,12 @@
|
|
|
export default {
|
|
|
components: {
|
|
|
KdCard,
|
|
|
- CardTime
|
|
|
+ CardTime,
|
|
|
+ SearchPopup
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ formData: {},
|
|
|
orderTitle: '',
|
|
|
tabsCurrent: 0, // tabs初始位置
|
|
|
doneRange: [
|
|
|
@@ -155,7 +184,7 @@
|
|
|
activeType: 'maintenance',
|
|
|
activeIndex: 0,
|
|
|
dataList: [],
|
|
|
- moreSearch: false,
|
|
|
+ searchShow: false,
|
|
|
statusRange: {
|
|
|
repair: [
|
|
|
{
|
|
|
@@ -312,6 +341,7 @@
|
|
|
},
|
|
|
onShow(e) {
|
|
|
if (this.isInstall) return
|
|
|
+ this.dataList = []
|
|
|
this.getList()
|
|
|
this.getCount()
|
|
|
},
|
|
|
@@ -346,9 +376,10 @@
|
|
|
// 紧急度选择
|
|
|
doneChange(id) {},
|
|
|
doSearch() {
|
|
|
+ this.dataList = []
|
|
|
this.page = 1
|
|
|
this.getList()
|
|
|
- this.moreSearch = false
|
|
|
+ this.searchShow = false
|
|
|
},
|
|
|
reset() {
|
|
|
this.searchFrom = {
|
|
|
@@ -387,9 +418,10 @@
|
|
|
console.log(item)
|
|
|
this.activeType = item.type
|
|
|
this.activeIndex = item.index
|
|
|
+ this.dataList = []
|
|
|
this.page = 1
|
|
|
this.reset()
|
|
|
- this.moreSearch = false
|
|
|
+ this.searchShow = false
|
|
|
},
|
|
|
getCount() {
|
|
|
statistics().then(data => {
|
|
|
@@ -435,7 +467,7 @@
|
|
|
const params = {
|
|
|
type: this.tabList[this.activeIndex].workOrderType,
|
|
|
pageNum: this.page,
|
|
|
- size: 8,
|
|
|
+ size: 10,
|
|
|
...this.searchFrom
|
|
|
}
|
|
|
// 维修
|
|
|
@@ -466,7 +498,7 @@
|
|
|
// this.dataList = []
|
|
|
// }
|
|
|
// this.dataList.push(...res.data.list.records)
|
|
|
- this.dataList = res.list
|
|
|
+ this.dataList = this.dataList.concat(res.list)
|
|
|
isEnd = this.dataList.length >= res.count
|
|
|
} else {
|
|
|
this.dataList = []
|
|
|
@@ -496,6 +528,13 @@
|
|
|
height: 0;
|
|
|
color: transparent;
|
|
|
}
|
|
|
+ .scan_btn {
|
|
|
+ background: url('../../../static/scan.png');
|
|
|
+ background-size: 100% 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ width: 50rpx;
|
|
|
+ height: 50rpx;
|
|
|
+ }
|
|
|
.kd-work-container {
|
|
|
height: 100vh;
|
|
|
overflow: hidden;
|
|
|
@@ -606,6 +645,10 @@
|
|
|
flex: 1;
|
|
|
}
|
|
|
|
|
|
+ .more_search {
|
|
|
+ padding: 0 20rpx;
|
|
|
+ }
|
|
|
+
|
|
|
/deep/.u-input {
|
|
|
border: 1rpx solid #ccc;
|
|
|
|
|
|
@@ -620,4 +663,17 @@
|
|
|
margin-left: 10rpx;
|
|
|
}
|
|
|
}
|
|
|
+ .search_list {
|
|
|
+ min-height: 100rpx;
|
|
|
+ /deep/ .baseForm {
|
|
|
+ padding: 10rpx 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .operate_box {
|
|
|
+ padding: 10rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+ .mg-20 {
|
|
|
+ margin-right: 20rpx;
|
|
|
+ }
|
|
|
</style>
|