|
@@ -1,13 +1,11 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="app-main app-content">
|
|
<view class="app-main app-content">
|
|
|
<view class="input-wrap_box">
|
|
<view class="input-wrap_box">
|
|
|
-
|
|
|
|
|
<view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
|
|
<view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
|
|
|
<text>{{searchTypeName}}</text>
|
|
<text>{{searchTypeName}}</text>
|
|
|
|
|
+ <i class="iconfont iconsanjiao_xia"></i>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
<view> <AppSearchModule placeholder="请输入" @input="searchFn"/> </view>
|
|
<view> <AppSearchModule placeholder="请输入" @input="searchFn"/> </view>
|
|
|
-
|
|
|
|
|
<view class="select-dn_bx">
|
|
<view class="select-dn_bx">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
</view>
|
|
</view>
|
|
@@ -59,7 +57,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
orderId:'',
|
|
orderId:'',
|
|
|
- seekVal: "",
|
|
|
|
|
|
|
+ searchText: "",
|
|
|
isShow: false,
|
|
isShow: false,
|
|
|
customizationTime: [],
|
|
customizationTime: [],
|
|
|
customizationTimeType: "",
|
|
customizationTimeType: "",
|
|
@@ -88,8 +86,8 @@ export default {
|
|
|
categoryId: "",
|
|
categoryId: "",
|
|
|
usageId: "",
|
|
usageId: "",
|
|
|
},
|
|
},
|
|
|
- searchType:1, // 默认搜索类别为:编号
|
|
|
|
|
- searchTypeName:'编号',
|
|
|
|
|
|
|
+ searchType:1,
|
|
|
|
|
+ searchTypeName:'美团号',
|
|
|
searchTime:'',
|
|
searchTime:'',
|
|
|
startTime:'',
|
|
startTime:'',
|
|
|
endTime:''
|
|
endTime:''
|
|
@@ -141,15 +139,15 @@ export default {
|
|
|
setSearchType(){
|
|
setSearchType(){
|
|
|
let that = this
|
|
let that = this
|
|
|
uni.showActionSheet({
|
|
uni.showActionSheet({
|
|
|
- itemList: ['搜索类型:', '名称', '编号'],
|
|
|
|
|
|
|
+ itemList: ['搜索类型:', '美团号', '编号'],
|
|
|
success: function (respond) {
|
|
success: function (respond) {
|
|
|
let currentIndex = respond.tapIndex
|
|
let currentIndex = respond.tapIndex
|
|
|
if(currentIndex == 0){
|
|
if(currentIndex == 0){
|
|
|
- that.$msg('搜索类型出错')
|
|
|
|
|
|
|
+ that.$msg('请选择类型')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- that.searchType = Number(currentIndex) - 1
|
|
|
|
|
- that.searchTypeName = that.searchType == 0 ? '名称' : '编号'
|
|
|
|
|
|
|
+ that.searchType = Number(currentIndex)
|
|
|
|
|
+ that.searchTypeName = that.searchType == 0 ? '美团号' : '编号'
|
|
|
that.searchFn()
|
|
that.searchFn()
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -163,19 +161,25 @@ export default {
|
|
|
},
|
|
},
|
|
|
searchFn(e) {
|
|
searchFn(e) {
|
|
|
this.resetList();
|
|
this.resetList();
|
|
|
- this.seekVal = e;
|
|
|
|
|
|
|
+ this.searchText = e;
|
|
|
this._list()
|
|
this._list()
|
|
|
},
|
|
},
|
|
|
_list() {
|
|
_list() {
|
|
|
- return getWorkList({
|
|
|
|
|
|
|
+ let params = {
|
|
|
searchTime: this.searchTime,
|
|
searchTime: this.searchTime,
|
|
|
startTime: this.startTime,
|
|
startTime: this.startTime,
|
|
|
endTime: this.endTime,
|
|
endTime: this.endTime,
|
|
|
status: this.tabs[this.tabIndex].id,
|
|
status: this.tabs[this.tabIndex].id,
|
|
|
- name: this.seekVal,
|
|
|
|
|
- page: this.list.page,
|
|
|
|
|
- searchType:this.searchType,
|
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
|
+ page: this.list.page
|
|
|
|
|
+ }
|
|
|
|
|
+ if(this.searchType == 1){
|
|
|
|
|
+ params = {...params,thirdSn:this.searchText}
|
|
|
|
|
+ }else if(this.searchType == 2){
|
|
|
|
|
+ params = {...params,sn:this.searchText}
|
|
|
|
|
+ }else{
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ return getWorkList(params).then((res) => {
|
|
|
this.completes(res);
|
|
this.completes(res);
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
return false
|
|
return false
|