Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
47bf2eec
Commit
47bf2eec
authored
Aug 24, 2021
by
高铭波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增联想工单功能
parent
e63794f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
391 additions
and
323 deletions
+391
-323
package-lock.json
package-lock.json
+106
-59
http.interceptor.js
src/common/http.interceptor.js
+1
-1
search.vue
src/pages/order/search.vue
+284
-263
No files found.
package-lock.json
View file @
47bf2eec
...
@@ -3023,6 +3023,8 @@
...
@@ -3023,6 +3023,8 @@
"terser-webpack-plugin"
:
"^2.3.6"
,
"terser-webpack-plugin"
:
"^2.3.6"
,
"thread-loader"
:
"^2.1.3"
,
"thread-loader"
:
"^2.1.3"
,
"url-loader"
:
"^2.2.0"
,
"url-loader"
:
"^2.2.0"
,
"vue-loader"
:
"^15.9.2"
,
"vue-loader-v16"
:
"npm:vue-loader@^16.1.0"
,
"vue-style-loader"
:
"^4.1.2"
,
"vue-style-loader"
:
"^4.1.2"
,
"webpack"
:
"^4.0.0"
,
"webpack"
:
"^4.0.0"
,
"webpack-bundle-analyzer"
:
"^3.8.0"
,
"webpack-bundle-analyzer"
:
"^3.8.0"
,
...
@@ -3037,14 +3039,6 @@
...
@@ -3037,14 +3039,6 @@
"integrity"
:
"sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo="
,
"integrity"
:
"sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo="
,
"dev"
:
true
"dev"
:
true
},
},
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"cacache"
:
{
"cacache"
:
{
"version"
:
"13.0.1"
,
"version"
:
"13.0.1"
,
"resolved"
:
"https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/cacache/download/cacache-13.0.1.tgz?cache=0&sync_timestamp=1616431156987&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcacache%2Fdownload%2Fcacache-13.0.1.tgz"
,
...
@@ -3071,28 +3065,6 @@
...
@@ -3071,28 +3065,6 @@
"unique-filename"
:
"^1.1.1"
"unique-filename"
:
"^1.1.1"
}
}
},
},
"chalk"
:
{
"version"
:
"4.1.1"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/chalk/-/chalk-4.1.1.tgz"
,
"integrity"
:
"sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg=="
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"css-loader"
:
{
"css-loader"
:
{
"version"
:
"3.6.0"
,
"version"
:
"3.6.0"
,
"resolved"
:
"https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/css-loader/download/css-loader-3.6.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcss-loader%2Fdownload%2Fcss-loader-3.6.0.tgz"
,
...
@@ -3187,15 +3159,11 @@
...
@@ -3187,15 +3159,11 @@
"slash"
:
"^2.0.0"
"slash"
:
"^2.0.0"
}
}
},
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
},
"hash-sum"
:
{
"hash-sum"
:
{
"version"
:
"2.0.0"
,
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz"
,
"integrity"
:
"sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo="
"integrity"
:
"sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo="
,
"dev"
:
true
},
},
"human-signals"
:
{
"human-signals"
:
{
"version"
:
"1.1.1"
,
"version"
:
"1.1.1"
,
...
@@ -3355,14 +3323,6 @@
...
@@ -3355,14 +3323,6 @@
"minipass"
:
"^3.1.1"
"minipass"
:
"^3.1.1"
}
}
},
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
},
"terser-webpack-plugin"
:
{
"terser-webpack-plugin"
:
{
"version"
:
"2.3.8"
,
"version"
:
"2.3.8"
,
"resolved"
:
"https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610196021147&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/terser-webpack-plugin/download/terser-webpack-plugin-2.3.8.tgz?cache=0&sync_timestamp=1610196021147&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fterser-webpack-plugin%2Fdownload%2Fterser-webpack-plugin-2.3.8.tgz"
,
...
@@ -3381,24 +3341,23 @@
...
@@ -3381,24 +3341,23 @@
}
}
},
},
"vue-loader"
:
{
"vue-loader"
:
{
"version"
:
"16.3.0"
,
"version"
:
"15.9.8"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-16.3.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.8.tgz"
,
"integrity"
:
"sha512-UDgni/tUVSdwHuQo+vuBmEgamWx88SuSlEb5fgdvHrlJSPB9qMBRF6W7bfPWSqDns425Gt1wxAUif+f+h/rWjg=="
,
"integrity"
:
"sha512-GwSkxPrihfLR69/dSV3+5CdMQ0D+jXg8Ma1S4nQXKJAznYFX14vHdc/NetQc34Dw+rBbIJyP7JOuVb9Fhprvog=="
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"@vue/component-compiler-utils"
:
"^3.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"hash-sum"
:
"^1.0.2"
,
"loader-utils"
:
"^2.0.0"
"loader-utils"
:
"^1.1.0"
,
"vue-hot-reload-api"
:
"^2.3.0"
,
"vue-style-loader"
:
"^4.1.0"
},
},
"dependencies"
:
{
"dependencies"
:
{
"loader-utils"
:
{
"hash-sum"
:
{
"version"
:
"2.0.0"
,
"version"
:
"1.0.2"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/loader-utils/-/loader-utils-2.0.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"integrity"
:
"sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ="
,
"requires"
:
{
"dev"
:
true
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
}
}
}
}
}
}
...
@@ -16421,6 +16380,94 @@
...
@@ -16421,6 +16380,94 @@
"vue-style-loader"
:
"^4.1.0"
"vue-style-loader"
:
"^4.1.0"
}
}
},
},
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.5.0"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.5.0.tgz"
,
"integrity"
:
"sha512-WXh+7AgFxGTgb5QAkQtFeUcHNIEq3PGVQ8WskY5ZiFbWBkOwcCPRs4w/2tVyTbh2q6TVRlO3xfvIukUtjsu62A=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
},
"dependencies"
:
{
"ansi-styles"
:
{
"version"
:
"4.3.0"
,
"resolved"
:
"https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
,
"integrity"
:
"sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
}
},
"chalk"
:
{
"version"
:
"4.1.2"
,
"resolved"
:
"https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
,
"integrity"
:
"sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"ansi-styles"
:
"^4.1.0"
,
"supports-color"
:
"^7.1.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
,
"dev"
:
true
,
"optional"
:
true
},
"has-flag"
:
{
"version"
:
"4.0.0"
,
"resolved"
:
"https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
,
"integrity"
:
"sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
,
"dev"
:
true
,
"optional"
:
true
},
"hash-sum"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/hash-sum/-/hash-sum-2.0.0.tgz"
,
"integrity"
:
"sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg=="
,
"dev"
:
true
,
"optional"
:
true
},
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
},
"supports-color"
:
{
"version"
:
"7.2.0"
,
"resolved"
:
"https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
,
"integrity"
:
"sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="
,
"dev"
:
true
,
"optional"
:
true
,
"requires"
:
{
"has-flag"
:
"^4.0.0"
}
}
}
},
"vue-style-loader"
:
{
"vue-style-loader"
:
{
"version"
:
"4.1.3"
,
"version"
:
"4.1.3"
,
"resolved"
:
"https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz?cache=0&sync_timestamp=1614758652197&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-style-loader%2Fdownload%2Fvue-style-loader-4.1.3.tgz"
,
"resolved"
:
"https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-4.1.3.tgz?cache=0&sync_timestamp=1614758652197&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-style-loader%2Fdownload%2Fvue-style-loader-4.1.3.tgz"
,
...
...
src/common/http.interceptor.js
View file @
47bf2eec
...
@@ -51,7 +51,7 @@ const install = (Vue, vm) => {
...
@@ -51,7 +51,7 @@ const install = (Vue, vm) => {
config
.
header
[
'Authorization'
]
=
token
config
.
header
[
'Authorization'
]
=
token
}
}
// config.header.token = vm.vuex_token || 'RTOKENe56f873b5823477fa2e15572f8fa7eb3a5fb6f7b'
;
config
.
header
[
'token'
]
=
token
;
config
.
header
[
'x-requested-with'
]
=
'xmlhttprequest'
;
config
.
header
[
'x-requested-with'
]
=
'xmlhttprequest'
;
return
config
;
return
config
;
}
}
...
...
src/pages/order/search.vue
View file @
47bf2eec
<!-- 工单-搜索页 -->
<!-- 工单-搜索页 -->
<
template
>
<
template
>
<view
class=
"search-wrap"
>
<view
class=
"search-wrap"
>
<view
class=
"top-item"
>
<view
class=
"top-item"
>
<u-search
<u-search
v-model=
"search.keyword"
v-model=
"search.keyword"
bg-color=
"#FFFFFF"
bg-color=
"#FFFFFF"
placeholder=
"搜索:工单号·用户姓名·手机号·地址"
placeholder=
"搜索:工单号·用户姓名·手机号·地址"
search-icon-color=
"#999999"
search-icon-color=
"#999999"
color=
"#333333"
color=
"#333333"
placeholder-color=
"#999999"
placeholder-color=
"#999999"
height=
"72"
height=
"72"
margin=
"0 30rpx"
margin=
"0 30rpx"
:animation=
"true"
:animation=
"true"
:show-action=
"true"
:show-action=
"true"
:action-style=
"
{
:action-style=
"
{
'font-size': '32rpx',
'font-size': '32rpx',
'font-weight': 500,
'font-weight': 500,
'color': '#2272FF'
color: '#2272FF',
}"
}"
:focus="true"
:focus="true"
@change="keywordChange"
@change="keywordChange"
@focus="onfocus"
@focus="onfocus"
@blur="loseFocus"
@blur="loseFocus"
@search="searchOrder"
@search="searchOrder"
@custom="searchOrder"
@custom="searchOrder"
>
</u-search>
>
</u-search>
</view>
</view>
<view
class=
"association-wrap"
v-show=
"showAssociation"
>
<view
class=
"association-wrap"
v-show=
"showAssociation"
>
<view
v-for=
"(item, index) in associationList"
:key=
"index"
<view
class=
"association-cell u-border-top"
v-for=
"(item, index) in associationList"
@
click=
"handleClick(item, orderType, true)"
>
:key=
"index"
<view
class=
"u-m-l-40"
>
class=
"association-cell u-border-top"
<u-parse
:html=
"item.contactNameHighlight"
:tag-style=
"style"
></u-parse>
@
click=
"handleClick(item, orderType, true)"
</view>
>
<view
class=
"u-m-l-10"
>
<view
class=
"u-m-l-40"
>
<u-parse
:html=
"item.contactPhoneHighlight"
:tag-style=
"style"
></u-parse>
<u-parse
</view>
:html=
"item.contactNameHighlight"
</view>
:tag-style=
"style"
<view
class=
"u-border-top"
/>
></u-parse>
</view>
</view>
<view
class=
"content-item"
v-show=
"showOrderCell"
>
<view
class=
"u-m-l-10"
>
<view
v-if=
"orderList && orderList.length > 0"
class=
"order-row"
>
<u-parse
<view
v-for=
"(item) in orderList"
:key=
"item.orderId"
>
:html=
"item.contactPhoneHighlight"
<OrderCell
:orderData=
"item"
:orderType=
"orderType"
:location=
"dataValue"
:tag-style=
"style"
@
click=
"handleClick"
@
action=
"handleClickCellButton"
>
</OrderCell>
></u-parse>
</view>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</view>
<view
class=
"u-border-top"
/>
<view
v-else-if=
"loaded"
class=
"empty-result"
>
</view>
<u-image
width=
"374"
height=
"256"
:src=
"searchEmpty"
>
<view
class=
"content-item"
v-show=
"showOrderCell"
>
<u-loading
slot=
"loading"
></u-loading>
<view
v-if=
"orderList && orderList.length > 0"
class=
"order-row"
>
</u-image>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<text
class=
"empty-message"
>
<OrderCell
当前暂无搜索结果
:orderData=
"item"
</text>
:orderType=
"orderType"
</view>
:location=
"dataValue"
@
click=
"handleClick"
</view>
@
action=
"handleClickCellButton"
</view>
>
</OrderCell>
</view>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
<view
v-else-if=
"loaded"
class=
"empty-result"
>
<u-image
width=
"374"
height=
"256"
:src=
"searchEmpty"
>
<u-loading
slot=
"loading"
></u-loading>
</u-image>
<text
class=
"empty-message"
>
当前暂无搜索结果
</text>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
OrderCell
from
"@/components/order/index.vue"
;
import
OrderCell
from
"@/components/order/index.vue"
;
export
default
{
export
default
{
components
:
{
components
:
{
OrderCell
OrderCell
,
},
},
data
()
{
data
()
{
return
{
return
{
search
:
{
search
:
{
type
:
''
,
type
:
""
,
keyword
:
''
,
keyword
:
""
,
pageSize
:
10
,
pageSize
:
10
,
pageNumber
:
0
,
pageNumber
:
0
,
orderStatusRangeType
:
''
,
orderStatusRangeType
:
""
,
},
},
orderList
:
[],
orderList
:
[],
associationList
:
[],
associationList
:
[],
loaded
:
false
,
loaded
:
false
,
focused
:
true
,
focused
:
true
,
total
:
10
,
total
:
10
,
loadStaus
:
'loadmore'
,
loadStaus
:
"loadmore"
,
style
:
{
style
:
{
// 字符串的形式
// 字符串的形式
span
:
'color: red'
span
:
"color: red"
,
}
},
};
};
},
},
onLoad
()
{
onLoad
()
{
getApp
().
trackPage
(
'订单搜索页'
)
getApp
().
trackPage
(
"订单搜索页"
);
// this.searchOrder()
// this.searchOrder()
this
.
associationOrder
()
this
.
associationOrder
();
},
},
onReachBottom
()
{
onReachBottom
()
{
let
len
=
this
.
orderList
&&
this
.
orderList
.
length
||
0
let
len
=
(
this
.
orderList
&&
this
.
orderList
.
length
)
||
0
;
if
(
!
this
.
loaded
||
len
>=
this
.
total
)
return
;
if
(
!
this
.
loaded
||
len
>=
this
.
total
)
return
;
this
.
loadStaus
=
'loading'
;
this
.
loadStaus
=
"loading"
;
this
.
search
.
pageNumber
=
++
this
.
search
.
pageNumber
;
this
.
search
.
pageNumber
=
++
this
.
search
.
pageNumber
;
this
.
getOrderList
(
'onReachBottom'
)
this
.
getOrderList
(
"onReachBottom"
);
},
},
computed
:
{
computed
:
{
searchEmpty
()
{
searchEmpty
()
{
return
process
.
uniEnv
.
qn_base_url
+
'SearchEmpty.png'
return
process
.
uniEnv
.
qn_base_url
+
"SearchEmpty.png"
;
},
},
showAssociation
()
{
showAssociation
()
{
return
this
.
focused
&&
!
this
.
$u
.
test
.
isEmpty
(
this
.
associationList
)
return
this
.
focused
&&
!
this
.
$u
.
test
.
isEmpty
(
this
.
associationList
);
},
},
showOrderCell
()
{
showOrderCell
()
{
return
!
this
.
focused
&&
this
.
$u
.
test
.
isEmpty
(
this
.
associationList
)
return
!
this
.
focused
&&
this
.
$u
.
test
.
isEmpty
(
this
.
associationList
);
}
},
},
},
methods
:
{
methods
:
{
searchOrder
(
index
)
{
searchOrder
(
index
)
{
this
.
search
.
pageNumber
=
1
this
.
search
.
pageNumber
=
1
;
this
.
loadStaus
=
'loading'
;
this
.
loadStaus
=
"loading"
;
if
(
this
.
search
.
keyword
)
{
if
(
this
.
search
.
keyword
)
{
getApp
().
track
(
'search_order'
,
{
keyword
:
this
.
search
.
keyword
});
getApp
().
track
(
"search_order"
,
{
keyword
:
this
.
search
.
keyword
});
this
.
getOrderList
()
this
.
getOrderList
();
}
}
},
},
// 高亮文本
// 高亮文本
highlights
()
{
highlights
()
{
const
keyword
=
this
.
search
.
keyword
const
keyword
=
this
.
search
.
keyword
;
this
.
associationList
=
this
.
associationList
.
map
(
item
=>
{
this
.
associationList
=
this
.
associationList
.
map
((
item
)
=>
{
for
(
let
key
in
item
)
{
for
(
let
key
in
item
)
{
if
(
key
===
'contactName'
||
key
===
'contactPhone'
)
{
if
(
key
===
"contactName"
||
key
===
"contactPhone"
)
{
let
replaceReg
=
new
RegExp
(
keyword
,
'g'
)
// 匹配关键字正则
let
replaceReg
=
new
RegExp
(
keyword
,
"g"
);
// 匹配关键字正则
let
replaceString
=
'<span>'
+
keyword
+
'</span>'
// 高亮替换v-html值
let
replaceString
=
"<span>"
+
keyword
+
"</span>"
;
// 高亮替换v-html值
item
[
key
+
'Highlight'
]
=
item
[
key
].
replace
(
replaceReg
,
replaceString
)
// 开始替换
item
[
key
+
"Highlight"
]
=
item
[
key
].
replace
(
}
replaceReg
,
}
replaceString
return
item
);
// 开始替换
})
}
},
}
/** 联想工单 */
return
item
;
async
associationOrder
()
{
});
let
res
=
await
this
.
$u
.
api
.
association
(
this
.
search
)
},
if
(
res
&&
res
.
code
==
200
)
{
/** 联想工单 */
this
.
associationList
=
res
.
data
async
associationOrder
()
{
}
let
res
=
await
this
.
$u
.
api
.
association
(
this
.
search
);
if
(
res
&&
res
.
code
==
200
)
{
this
.
associationList
=
res
.
data
;
}
this
.
highlights
();
},
/** 搜索关键字变更 */
keywordChange
(
value
)
{
if
(
this
.
$u
.
test
.
isEmpty
(
value
))
{
this
.
associationList
=
[];
}
else
{
this
.
associationOrder
();
}
},
/** 获得焦点 */
onfocus
()
{
this
.
focused
=
true
;
},
/** 失去焦点 */
loseFocus
()
{
this
.
focused
=
false
;
},
// 页面数据
getOrderList
(
event
)
{
let
self
=
this
;
if
(
!
self
.
search
.
keyword
)
{
return
false
;
}
this
.
associationList
=
[
// 状态处理
{
contactName
:
"张一山"
,
contactPhone
:
"10000000000"
,
orderId
:
"1"
},
self
.
loaded
=
false
;
{
contactName
:
"赵十天"
,
contactPhone
:
"19999999999"
,
orderId
:
"2"
},
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
{
contactName
:
"王九平"
,
contactPhone
:
"11111111111"
,
orderId
:
"3"
},
if
(
res
.
code
==
200
)
{
{
contactName
:
"李二狗"
,
contactPhone
:
"12222222222"
,
orderId
:
"4"
},
if
(
res
.
data
)
{
{
contactName
:
"王三水"
,
contactPhone
:
"13333333333"
,
orderId
:
"5"
},
let
list
=
res
.
data
.
list
||
[];
{
contactName
:
"赵四方"
,
contactPhone
:
"14444444444"
,
orderId
:
"6"
},
self
.
total
=
res
.
data
.
total
||
0
;
{
contactName
:
"张五月"
,
contactPhone
:
"15555555555"
,
orderId
:
"7"
},
if
(
event
==
"onReachBottom"
)
{
{
contactName
:
"李六七"
,
contactPhone
:
"16666666666"
,
orderId
:
"8"
},
self
.
orderList
.
push
(...
list
);
{
contactName
:
"王七斤"
,
contactPhone
:
"17777777777"
,
orderId
:
"9"
},
}
else
{
{
contactName
:
"赵八有"
,
contactPhone
:
"18888888888"
,
orderId
:
"0"
},
self
.
orderList
=
list
;
]
}
this
.
highlights
()
self
.
loadStatus
=
},
res
.
data
.
total
>
self
.
orderList
.
length
?
"loadmore"
:
"nomore"
;
/** 搜索关键字变更 */
}
keywordChange
(
value
)
{
}
else
{
if
(
this
.
$u
.
test
.
isEmpty
(
value
))
{
self
.
$u
.
toast
(
"请求失败"
);
this
.
associationList
=
[]
}
}
else
{
self
.
loaded
=
true
;
this
.
associationOrder
()
});
}
},
},
handleClickCellButton
(
item
)
{
/** 获得焦点 */
// 去完工
onfocus
()
{
uni
.
navigateTo
({
this
.
focused
=
true
url
:
},
"pages/order/complete?orderId="
+
/** 失去焦点 */
item
.
orderId
+
loseFocus
()
{
"&categoryId="
+
this
.
focused
=
false
item
.
categoryId
+
},
"&orderServiceType="
+
// 页面数据
item
.
orderServiceType
+
getOrderList
(
event
)
{
"&inGuaranteePeriod="
+
let
self
=
this
;
item
.
inGuaranteePeriod
+
if
(
!
self
.
search
.
keyword
)
{
"&partnerCompanyId="
+
return
false
item
.
partnerCompanyId
+
}
"&auditResultsId="
+
(
item
.
auditResults
// 状态处理
?
Object
.
keys
(
item
.
auditResults
)[
self
.
loaded
=
false
Object
.
keys
(
item
.
auditResults
).
length
-
1
self
.
$u
.
api
.
listOrder
(
self
.
search
).
then
((
res
)
=>
{
]
if
(
res
.
code
==
200
)
{
:
""
)
+
if
(
res
.
data
)
{
"&maintainStep="
+
let
list
=
res
.
data
.
list
||
[]
item
.
maintainStep
,
self
.
total
=
res
.
data
.
total
||
0
});
if
(
event
==
'onReachBottom'
)
{
},
self
.
orderList
.
push
(...
list
)
handleClick
(
item
,
type
,
showCountTime
)
{
}
else
{
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
self
.
orderList
=
list
//type类型
}
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
self
.
loadStatus
=
res
.
data
.
total
>
self
.
orderList
.
length
?
'loadmore'
:
'nomore'
uni
.
navigateTo
({
}
url
:
}
else
{
"pages/order/detail?id="
+
self
.
$u
.
toast
(
'请求失败'
);
item
.
orderId
+
}
"&type="
+
self
.
loaded
=
true
type
+
});
"&showCountTime="
+
},
showCountTime
,
handleClickCellButton
(
item
)
{
});
// 去完工
},
uni
.
navigateTo
({
},
url
:
'pages/order/complete?orderId='
+
item
.
orderId
};
+
"&categoryId="
+
item
.
categoryId
+
"&orderServiceType="
+
item
.
orderServiceType
+
"&inGuaranteePeriod="
+
item
.
inGuaranteePeriod
+
"&partnerCompanyId="
+
item
.
partnerCompanyId
+
"&auditResultsId="
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
)[
Object
.
keys
(
item
.
auditResults
).
length
-
1
]:
''
)
+
"&maintainStep="
+
item
.
maintainStep
})
},
handleClick
(
item
,
type
,
showCountTime
)
{
// type:类型,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
//type类型
// 'waitAccept': 待接单、待抢单;'waitAppointment': 待预约;'waitCheckIn': 待签到;'waitFinish': 待完工;'audit': 审核中;'exception': 异常单;'finish': 已完工;'other': 工单结算信息
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
item
.
orderId
+
'&type='
+
type
+
'&showCountTime='
+
showCountTime
})
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.search-wrap
{
.search-wrap
{
.top-item
{
.top-item
{
position
:
sticky
;
position
:
sticky
;
padding
:
20rpx
0
;
padding
:
20rpx
0
;
top
:
0rpx
;
top
:
0rpx
;
background-color
:
#F4F5F7
;
background-color
:
#f4f5f7
;
z-index
:
2
;
z-index
:
2
;
/
deep
/
.u-search
.u-content
{
/
deep
/
.u-search
.u-content
{
padding
:
0
20rpx
0
40rpx
;
padding
:
0
20rpx
0
40rpx
;
}
}
/
deep
/
.u-search
.u-input
{
/
deep
/
.u-search
.u-input
{
margin
:
0
24rpx
;
margin
:
0
24rpx
;
}
}
/
deep
/
.u-search
.u-icon--right
.u-iconfont
{
/
deep
/
.u-search
.u-icon--right
.u-iconfont
{
font-size
:
36rpx
!
important
;
font-size
:
36rpx
!
important
;
}
}
/
deep
/
.u-search
.u-close-wrap
.u-iconfont
{
/
deep
/
.u-search
.u-close-wrap
.u-iconfont
{
color
:
#CCCCCC
;
color
:
#cccccc
;
}
}
}
}
.content-item
{
padding
:
10rpx
30rpx
20rpx
30rpx
;
.empty-result
{
padding-top
:
354rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.empty-message
{
padding-top
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
28rpx
;
}
}
}
.association-wrap
{
.content-item
{
.association-cell
{
padding
:
10rpx
30rpx
20rpx
30rpx
;
display
:
flex
;
padding
:
26rpx
32rpx
;
.empty-result
{
font-size
:
28rpx
;
padding-top
:
354rpx
;
line-height
:
54rpx
;
display
:
flex
;
color
:
#606266
;
flex-direction
:
column
;
background
:
#FFFFFF
;
justify-content
:
center
;
}
align-items
:
center
;
}
.empty-message
{
padding-top
:
28rpx
;
font-size
:
28rpx
;
font-weight
:
400
;
color
:
#666666
;
line-height
:
28rpx
;
}
}
}
.association-wrap
{
.association-cell
{
display
:
flex
;
padding
:
26rpx
32rpx
;
font-size
:
28rpx
;
line-height
:
54rpx
;
color
:
#606266
;
background
:
#ffffff
;
}
}
}
}
</
style
>
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment