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
69848cf5
Commit
69848cf5
authored
Sep 14, 2021
by
Damon
Browse files
Options
Browse Files
Download
Plain Diff
chore: merge dev-1.5.0
parents
87e76966
85c30197
Changes
35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
3112 additions
and
1163 deletions
+3112
-1163
package-lock.json
package-lock.json
+106
-59
App.vue
src/App.vue
+5
-14
order.js
src/common/api/order.js
+23
-2
http.interceptor.js
src/common/http.interceptor.js
+4
-1
XhFiles.vue
src/components/createCom/XhFiles.vue
+1
-1
settlement.vue
src/components/mine/settlement.vue
+10
-9
statement.vue
src/components/mine/statement.vue
+8
-7
eusingList.vue
src/components/order/eusingList.vue
+52
-0
fiveOrders.vue
src/components/order/fiveOrders.vue
+199
-0
index.vue
src/components/order/index.vue
+201
-81
applyButton.vue
src/components/parts/applyButton.vue
+131
-51
returnCell.vue
src/components/parts/returnCell.vue
+2
-1
upload-progress.vue
src/components/upload-progress/upload-progress.vue
+256
-0
index.js
src/components/upload/index.js
+5
-5
task.js
src/components/upload/task.js
+18
-3
main.js
src/main.js
+10
-10
pages.json
src/pages.json
+40
-0
index.vue
src/pages/index/index.vue
+607
-535
mine.vue
src/pages/index/mine.vue
+41
-38
order.vue
src/pages/index/order.vue
+231
-126
index.vue
src/pages/mine/cert/index.vue
+0
-5
index.vue
src/pages/mine/contract/index.vue
+8
-6
index.vue
src/pages/mine/history/index.vue
+204
-0
index.vue
src/pages/mine/info/index.vue
+117
-0
index.vue
src/pages/mine/order/index.vue
+233
-0
list.vue
src/pages/mine/order/list.vue
+221
-0
index.vue
src/pages/mine/setting/index.vue
+1
-1
settlement.vue
src/pages/mine/wallet/settlement.vue
+9
-6
index.vue
src/pages/mine/warehouse/index.vue
+1
-1
complete.vue
src/pages/order/complete.vue
+56
-12
detail.vue
src/pages/order/detail.vue
+1
-5
search.vue
src/pages/order/search.vue
+292
-174
list.vue
src/pages/photo/list.vue
+6
-4
index.js
src/plugins/uploader/index.js
+4
-4
index.js
src/store/index.js
+9
-2
No files found.
package-lock.json
View file @
69848cf5
...
...
@@ -3023,6 +3023,8 @@
"terser-webpack-plugin"
:
"^2.3.6"
,
"thread-loader"
:
"^2.1.3"
,
"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"
,
"webpack"
:
"^4.0.0"
,
"webpack-bundle-analyzer"
:
"^3.8.0"
,
...
...
@@ -3037,14 +3039,6 @@
"integrity"
:
"sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo="
,
"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"
:
{
"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"
,
...
...
@@ -3071,28 +3065,6 @@
"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"
:
{
"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"
,
...
...
@@ -3187,15 +3159,11 @@
"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"
:
{
"version"
:
"2.0.0"
,
"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"
:
{
"version"
:
"1.1.1"
,
...
...
@@ -3355,14 +3323,6 @@
"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"
:
{
"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"
,
...
...
@@ -3381,24 +3341,23 @@
}
},
"vue-loader"
:
{
"version"
:
"16.3.0"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/vue-loader/-/vue-loader-16.3.0.tgz"
,
"integrity"
:
"sha512-UDgni/tUVSdwHuQo+vuBmEgamWx88SuSlEb5fgdvHrlJSPB9qMBRF6W7bfPWSqDns425Gt1wxAUif+f+h/rWjg=="
,
"version"
:
"15.9.8"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.8.tgz"
,
"integrity"
:
"sha512-GwSkxPrihfLR69/dSV3+5CdMQ0D+jXg8Ma1S4nQXKJAznYFX14vHdc/NetQc34Dw+rBbIJyP7JOuVb9Fhprvog=="
,
"dev"
:
true
,
"requires"
:
{
"chalk"
:
"^4.1.0"
,
"hash-sum"
:
"^2.0.0"
,
"loader-utils"
:
"^2.0.0"
"@vue/component-compiler-utils"
:
"^3.1.0"
,
"hash-sum"
:
"^1.0.2"
,
"loader-utils"
:
"^1.1.0"
,
"vue-hot-reload-api"
:
"^2.3.0"
,
"vue-style-loader"
:
"^4.1.0"
},
"dependencies"
:
{
"loader-utils"
:
{
"version"
:
"2.0.0"
,
"resolved"
:
"https://repo.huaweicloud.com/repository/npm/loader-utils/-/loader-utils-2.0.0.tgz"
,
"integrity"
:
"sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ=="
,
"requires"
:
{
"big.js"
:
"^5.2.2"
,
"emojis-list"
:
"^3.0.0"
,
"json5"
:
"^2.1.2"
}
"hash-sum"
:
{
"version"
:
"1.0.2"
,
"resolved"
:
"https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz"
,
"integrity"
:
"sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ="
,
"dev"
:
true
}
}
}
...
...
@@ -16421,6 +16380,94 @@
"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"
:
{
"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"
,
...
...
src/App.vue
View file @
69848cf5
...
...
@@ -4,6 +4,8 @@ import { AnalysysAgent } from "@/utils/analysys_paas.js";
import
util
from
"@/utils/util.js"
;
import
login
from
"@/utils/login.js"
;
import
upload
from
'@/components/upload/task.js'
import
{
ERROR
}
from
"@/common/log.js"
export
default
{
globalData
:
{
// 开发环境
...
...
@@ -74,8 +76,6 @@ export default {
this
.
getSystemInfo
();
// 系统自动登录::每次运行小程序重新获取用户信息
await
this
.
autoLogin
();
//this.deleteTempImg()
},
onShow
:
function
()
{
// 应用启动,或从后台进入前台显示
...
...
@@ -85,6 +85,9 @@ export default {
},
onHide
:
function
()
{
// 应用从前台进入后台
// if (this.uploadTask.length > 0) {
// ERROR('onUnload', {task: this.uploadTask.length, mobile: this.vuex_user.mobile})
// }
},
watch
:
{
uploadTask
:
function
(
newValue
,
oldValue
)
{
...
...
@@ -92,18 +95,6 @@ export default {
}
},
methods
:
{
// 处理已上传完成的图片
deleteTempImg
()
{
const
result
=
uni
.
getStorageSync
(
'delImg'
)
if
(
result
.
length
>
0
)
{
for
(
let
i
of
result
)
{
uni
.
removeSavedFile
({
filePath
:
i
})
}
uni
.
setStorageSync
(
'delImg'
,
[])
}
},
getSystemInfo
()
{
try
{
let
a
=
this
.
$u
.
sys
();
...
...
src/common/api/order.js
View file @
69848cf5
...
...
@@ -14,11 +14,22 @@ let orderApiFun = function(vm){
* 工单数量查询接口
*/
let
listOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/queryOrdersCount/V2'
,
params
);
/**
* 订单管理工单数量查询接口
*/
let
manageOrderCount
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/wokerOrder/countOrderByTimeRange'
,
params
);
/**
* 根据订单id数组获取订单列表
*/
let
listOrderByIds
=
async
(
string
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/listOrderByIds'
+
string
);
/**
* 工单列表接口
*/
let
listOrder
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/list'
,
params
);
/**
* 订单管理工单列表接口
*/
let
manageOrderList
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/listOrderByTimeRange'
,
params
);
/**
* 获取师傅的预约日历
...
...
@@ -172,6 +183,8 @@ let orderApiFun = function(vm){
let
listStatementDetails
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
settle
+
vm
.
vuex_token
+
'/queryStatementByPayableNo'
,
params
);
// 获取我的钱包-支付单一览
let
payableRecord
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
settle
+
vm
.
vuex_token
+
'/payable/v2/queryPayableRecord'
,
params
,
formType
);
// 获取我的钱包-支付单一览版本3
let
listPayableRecordByPayTime
=
async
(
params
=
{})
=>
await
vm
.
$u
.
post
(
settle
+
vm
.
vuex_token
+
'/payable/listPayableRecordByPayTime'
,
params
,
formType
);
// 获取我的钱包-师傅提现
let
workerApplyPay
=
async
()
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/applypay/batch/workerApplyPay'
);
// 是否有特殊登录权限
...
...
@@ -200,10 +213,16 @@ let orderApiFun = function(vm){
let
cancelParts
=
async
(
partOrderId
)
=>
await
vm
.
$u
.
put
(
prefix
+
'parts/'
+
vm
.
vuex_token
+
'/orders/'
+
partOrderId
+
'/cancel'
,{},
formType
);
// 点击了异常单去处理
let
workerDealWithError
=
async
(
orderId
,
params
=
{})
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/workerDealWithError'
,
params
)
// 工单搜索联想
let
association
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/association'
,
params
);
const
orderApi
=
{
listByRecommendOrder
,
listOrderCount
,
manageOrderCount
,
listOrderByIds
,
listOrder
,
manageOrderList
,
workerCalendar
,
workerAppointment
,
maintainWorkerCheckin
,
...
...
@@ -237,6 +256,7 @@ let orderApiFun = function(vm){
getAssets
,
listStatement
,
payableRecord
,
listPayableRecordByPayTime
,
listStatementDetails
,
workerApplyPay
,
allowLogin
,
...
...
@@ -252,7 +272,8 @@ let orderApiFun = function(vm){
getOrderPartsSum
,
receiveParts
,
cancelParts
,
workerDealWithError
workerDealWithError
,
association
}
return
orderApi
}
...
...
src/common/http.interceptor.js
View file @
69848cf5
...
...
@@ -51,7 +51,7 @@ const install = (Vue, vm) => {
config
.
header
[
'Authorization'
]
=
token
}
// config.header.token = vm.vuex_token || 'RTOKENe56f873b5823477fa2e15572f8fa7eb3a5fb6f7b'
;
config
.
header
[
'token'
]
=
token
;
config
.
header
[
'x-requested-with'
]
=
'xmlhttprequest'
;
return
config
;
}
...
...
@@ -76,6 +76,9 @@ const install = (Vue, vm) => {
function
getMsg
(
res
){
const
result
=
res
.
data
||
res
let
msg
=
result
.
message
||
result
.
errMsg
||
res
.
message
||
res
.
errMsg
if
(
msg
.
indexOf
(
'request:fail'
)
!==
-
1
)
{
msg
=
'当前网络较差,请重试'
}
if
(
res
.
code
==
200
||
res
.
status
==
true
||
msg
)
{
return
msg
}
...
...
src/components/createCom/XhFiles.vue
View file @
69848cf5
...
...
@@ -17,7 +17,7 @@
@
click
.
stop=
"prviewImage(item, index)"
fade
lazy-load
></u-image>
><
view
slot=
"error"
style=
"font-size: 24rpx;"
>
上传中
</view><
/u-image>
<view
class=
"icon-del-box"
v-if=
"!disabled"
...
...
src/components/mine/settlement.vue
View file @
69848cf5
...
...
@@ -10,7 +10,7 @@
</view>
<view
class=
"right-view"
>
<view
:class=
"['settlement-status-view', settlementTypeClass]"
>
{{
data
.
payableRecordStatusText
}}
</view>
<view
class=
"settlement-amount-view"
>
¥
{{
data
.
settlementAmount
}}
</view>
<view
class=
"settlement-amount-view"
>
¥
{{
data
.
paidAmount
||
0
}}
</view>
</view>
</view>
<view
class=
"line-view"
></view>
...
...
@@ -24,11 +24,11 @@
type
:
Object
,
default
()
{
return
{
paymentTime
:
new
Date
().
getTime
(),
payableRecordStatusText
:
'提现'
,
payableRecordNumber
:
'EE999777'
,
payableRecordId
:
''
,
settlementAmount
:
9899
paidTime
:
new
Date
().
getTime
(),
payableRecordStatusText
:
'提现'
,
payableRecordNumber
:
''
,
paidAmount
:
0
}
},
}
...
...
@@ -56,13 +56,13 @@
timeText
()
{
let
now
=
this
.
moment
().
startOf
(
'day'
).
unix
()
let
yesterday
=
this
.
moment
(
now
*
1000
).
subtract
(
1
,
'days'
).
unix
()
let
date
=
this
.
moment
(
this
.
data
.
updateDatet
ime
).
startOf
(
'day'
).
unix
()
let
date
=
this
.
moment
(
this
.
data
.
paidT
ime
).
startOf
(
'day'
).
unix
()
if
(
date
==
now
)
{
return
'今天'
}
else
if
(
date
==
yesterday
)
{
return
'昨天'
}
else
{
return
this
.
$u
.
timeFormat
(
this
.
data
.
updateDatet
ime
,
'mm.dd'
)
return
this
.
$u
.
timeFormat
(
this
.
data
.
paidT
ime
,
'mm.dd'
)
}
}
},
...
...
@@ -113,11 +113,12 @@
border
:
2rpx
solid
#FF930D
;
font-size
:
20rpx
;
color
:
#FF930D
;
width
:
80rpx
;
min-
width
:
80rpx
;
height
:
40rpx
;
text-align
:
center
;
padding-top
:
4rpx
;
margin-right
:
10rpx
;
line-height
:
40rpx
;
padding
:
0
10rpx
;
&
.settlement-type-y
{
border
:
2rpx
solid
#FF930D
;
...
...
src/components/mine/statement.vue
View file @
69848cf5
...
...
@@ -77,15 +77,15 @@
return
this
.
$u
.
timeFormat
(
this
.
data
.
updateDatetime
,
'mm.dd'
)
}
}
},
methods
:{
},
methods
:{
handleClick
()
{
if
(
this
.
data
.
status
==
'已确认'
)
{
this
.
$emit
(
'click'
,
this
.
data
.
orderId
)
}
else
{
this
.
$u
.
toast
(
'需等系统确认该订单,才可查看订单详情'
)
}
}
}
}
}
}
</
script
>
...
...
@@ -130,10 +130,11 @@
border
:
2rpx
solid
#FF930D
;
font-size
:
20rpx
;
color
:
#FF930D
;
width
:
80rpx
;
min-
width
:
80rpx
;
height
:
40rpx
;
text-align
:
center
;
padding-top
:
4rpx
;
line-height
:
40rpx
;
padding
:
0
10rpx
;
&
.statement-type-y
{
border
:
2rpx
solid
#FF930D
;
...
...
@@ -163,4 +164,4 @@
margin
:
0
30rpx
;
}
}
</
style
>
</
style
>
src/components/order/eusingList.vue
0 → 100644
View file @
69848cf5
<
template
>
<view
class=
"eusing-view"
>
<view
class=
"fixed-button"
>
<ApplyButton
:type
.
sync=
"buttonType"
icon=
"dingdan-button.png"
text=
"最近查看"
clickedType=
"hidden"
:show
.
sync=
"showApplyButton"
@
click=
"visible = true"
/>
</view>
<FiveOrders
:visible
.
sync=
"visible"
@
close=
"showApplyButton = true"
></FiveOrders>
</view>
</
template
>
<
script
>
import
ApplyButton
from
'@/components/parts/applyButton.vue'
import
FiveOrders
from
'@/components/order/fiveOrders.vue'
export
default
{
components
:
{
ApplyButton
,
FiveOrders
,
},
props
:
{
type
:
{
// 按钮宽'collapse': '80rpx', 'expand': '220rpx'
type
:
String
,
default
:
'expand'
,
},
},
data
()
{
return
{
buttonType
:
this
.
type
||
'expand'
,
// 申请按钮宽 collapse': '80rpx', 'expand': '220rpx''
showApplyButton
:
true
,
visible
:
false
,
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.eusing-view
{
.fixed-button
{
position
:
fixed
;
right
:
10rpx
;
bottom
:
64rpx
;
}
}
</
style
>
src/components/order/fiveOrders.vue
0 → 100644
View file @
69848cf5
<
template
>
<u-popup
v-model=
"visible"
mode=
"center"
safe-area-inset-bottom
width=
"690rpx"
border-radius=
"12"
close-icon-color=
"#333333"
>
<view
class=
"pop-view"
>
<image
:src=
"chakanjiluImage"
class=
"back-image"
mode=
"widthFix"
></image>
<view
class=
"head-view"
>
<view
class=
"left-view"
>
<view>
最近查看记录
</view>
<view
class=
"head-message"
>
最近查看或操作过的5条订单
</view>
</view>
<view
class=
"close-button"
@
click=
"$u.throttle(handleClose, 500)"
>
<u-icon
name=
"close"
></u-icon>
</view>
</view>
<view
class=
"none-view"
v-if=
"orderList.length
<
=
0
"
>
<NoOrder
text=
"当前暂无查看记录"
/>
</view>
<view
class=
"content-view"
v-else
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:location=
"[]"
model=
"simple"
@
click=
"handleClickCell"
@
action=
"handleClickButton"
>
</OrderCell>
</view>
<view
class=
"bottom-tip"
>
<u-loadmore
:status=
"nomore"
font-size=
"26"
color=
"#999999"
></u-loadmore>
</view>
</view>
</view>
</u-popup>
</
template
>
<
script
>
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
export
default
{
components
:
{
OrderCell
,
NoOrder
,
},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
// orderList: [],
loaded
:
false
,
}
},
computed
:
{
orderList
()
{
return
this
.
vuex_last_five_orders
.
filter
((
item
)
=>
item
)
||
[]
},
chakanjiluImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'chakanjilu.png'
},
},
methods
:
{
// getOrderList() {
// this.loaded = false
// var param = {
// pageNumber: 1,
// pageSize: 5,
// keyword: '',
// type: 'zuijinlianxi',
// }
// this.$u.api.listOrder(param).then((res) => {
// if (res.code == 200) {
// this.orderList = res.data.list || []
// } else {
// console.log(res.message, '获取订单数量失败!')
// }
// this.loaded = true
// })
// },
handleClose
()
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'close'
)
},
handleClickCell
(
item
,
type
,
showCountTime
)
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'click'
,
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
,
})
},
handleClickButton
(
item
,
type
,
showCountTime
,
auditResults
)
{
this
.
$emit
(
'update:visible'
,
false
)
this
.
$emit
(
'click'
,
item
,
type
,
showCountTime
,
auditResults
)
// 去完工
uni
.
navigateTo
({
url
:
'pages/order/complete?orderId='
+
item
.
orderId
+
'&categoryId='
+
item
.
categoryId
+
'&orderServiceType='
+
item
.
orderServiceType
+
'&inGuaranteePeriod='
+
item
.
inGuaranteePeriod
+
'&partnerCompanyId='
+
item
.
partnerCompanyId
+
'&maintainStep='
+
item
.
maintainStep
+
'&orderStatus='
+
item
.
orderStatus
+
'&brandId='
+
item
.
lianbaoBrandId
+
'&auditResults='
+
(
auditResults
?
auditResults
.
join
()
:
''
)
+
'&orderNumber='
+
item
.
orderNumber
,
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.pop-view
{
// padding: 30rpx;
max-height
:
900rpx
;
display
:
flex
;
flex-direction
:
column
;
display
:
relative
;
.back-image
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
-1
;
}
.head-view
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
flex-start
;
.left-view
{
padding
:
30rpx
30rpx
20rpx
30rpx
;
font-size
:
48rpx
;
font-weight
:
bold
;
color
:
#333333
;
.head-message
{
font-size
:
32rpx
;
color
:
#2272ff
;
font-weight
:
400
;
margin-top
:
14rpx
;
}
}
.close-button
{
width
:
60rpx
;
height
:
60rpx
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin
:
14rpx
;
}
}
.none-view
{
margin-top
:
30rpx
;
margin-bottom
:
50rpx
;
}
.content-view
{
height
:
100%
;
overflow
:
auto
;
.bottom-tip
{
margin-bottom
:
44rpx
;
margin-top
:
30rpx
;
}
}
}
</
style
>
src/components/order/index.vue
View file @
69848cf5
This diff is collapsed.
Click to expand it.
src/components/parts/applyButton.vue
View file @
69848cf5
<
template
>
<!-- 申请物料按钮 -->
<view
class=
"apply-button"
>
<u-button
:custom-style=
"customStyle"
shape=
"circle"
@
click
.
stop=
"handleClick"
type=
"primary"
>
<u-icon
class=
"apply-icon"
name=
"plus"
></u-icon>
<text
class=
"apply-text"
v-if=
"showText"
>
申请物料
</text>
</u-button>
</view>
<!-- 申请配件按钮 -->
<view
class=
"apply-button"
v-show=
"show"
>
<u-button
:custom-style=
"customStyle"
shape=
"circle"
@
click
.
stop=
"handleClick"
type=
"primary"
>
<view
class=
"button-view"
>
<u-loading
mode=
"flower"
:show=
"loading"
></u-loading>
<image
v-if=
"isImage && !loading"
:src=
"imageUrl"
class=
"image-icon"
mode=
"widthFix"
></image>
<u-icon
v-else-if=
"!loading"
class=
"apply-icon"
:name=
"icon"
></u-icon>
<text
class=
"apply-text"
v-if=
"showText"
>
{{
text
}}
</text>
</view>
</u-button>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
type
:
{
// 按钮宽'collapse': '80rpx', 'expand': '220rpx'
type
:
String
,
default
:
'expand'
}
},
computed
:
{
typeWidth
()
{
return
{
'collapse'
:
'80rpx'
,
'expand'
:
'220rpx'
}
},
showText
()
{
return
this
.
type
==
'expand'
},
customStyle
()
{
return
{
'height'
:
'80rpx'
,
'width'
:
this
.
typeWidth
[
this
.
type
],
}
}
},
created
()
{
setTimeout
(()
=>
{
this
.
$emit
(
'update:type'
,
'collapse'
)
},
3000
)
},
methods
:
{
handleClick
()
{
this
.
$emit
(
'click'
)
},
}
}
export
default
{
props
:
{
type
:
{
// 按钮宽'collapse': '80rpx', 'expand': '220rpx'
type
:
String
,
default
:
'expand'
,
},
text
:
{
type
:
String
,
default
:
'申请备件'
,
},
icon
:
{
type
:
String
,
default
:
'plus'
,
},
show
:
{
type
:
Boolean
,
default
:
true
,
},
clickedType
:
{
// normal 点击之后不隐藏; hidden 点击之后隐藏
type
:
String
,
default
:
'normal'
,
},
loading
:
{
type
:
Boolean
,
default
:
false
,
},
},
computed
:
{
typeWidth
()
{
return
{
collapse
:
'80rpx'
,
expand
:
'220rpx'
,
}
},
imageUrl
()
{
return
process
.
uniEnv
.
qn_base_url
+
this
.
icon
},
isImage
()
{
return
/
\.(
png|jpg|gif|jpeg|webp
)
$/
.
test
(
this
.
icon
)
},
clickedHidden
()
{
return
this
.
clickedType
==
'hidden'
},
typeOpacity
()
{
return
{
collapse
:
this
.
clicked
==
0
?
'0.6'
:
'1'
,
expand
:
'1'
,
}
},
showText
()
{
return
this
.
type
==
'expand'
},
customStyle
()
{
return
{
height
:
'80rpx'
,
width
:
this
.
typeWidth
[
this
.
type
],
opacity
:
this
.
typeOpacity
[
this
.
type
],
}
},
},
data
()
{
return
{
clicked
:
0
,
// 0 不活跃;>1 活跃中
}
},
created
()
{
setTimeout
(()
=>
{
this
.
$emit
(
'update:type'
,
'collapse'
)
},
3000
)
},
watch
:
{
show
(
val
)
{
if
(
val
)
{
this
.
clicked
+=
1
setTimeout
(()
=>
{
// 三秒不点击,算失去活跃
this
.
clicked
=
Math
.
max
(
0
,
this
.
clicked
-
1
)
},
3000
)
}
},
},
methods
:
{
handleClick
()
{
if
(
this
.
clickedHidden
)
{
this
.
$emit
(
'update:show'
,
false
)
}
this
.
$emit
(
'click'
)
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.apply-button
{
.apply-icon
{
font-size
:
36rpx
;
}
.apply-text
{
font-size
:
32rpx
;
padding-left
:
10rpx
;
}
}
.apply-button
{
.button-view
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
.apply-icon
{
font-size
:
36rpx
;
}
.apply-text
{
font-size
:
32rpx
;
padding-left
:
10rpx
;
}
.image-icon
{
width
:
30rpx
;
height
:
34rpx
;
}
}
}
</
style
>
src/components/parts/returnCell.vue
View file @
69848cf5
...
...
@@ -79,7 +79,8 @@
console
.
log
(
'success'
);
}
})
}
},
handleClick
(){}
}
}
</
script
>
...
...
src/components/upload-progress/upload-progress.vue
0 → 100644
View file @
69848cf5
<
template
>
<view
class=
"upload-progress"
>
<view
:class=
"['u-flex', 'suspension',
{'error': uploadStatus === 3}]" @click="openpRrogress">
<view
class=
"progress"
v-if=
"taskCount > 0"
>
{{
uploadPercentage
}}
%
</view>
<view
class=
"upload-img"
v-if=
"taskCount === 0"
>
<image
class=
"icon"
:src=
"icon"
></image>
</view>
</view>
<u-popup
v-model=
"open"
border-radius=
"12"
mode=
"center"
:animation=
"false"
@
close=
"closePopup"
width=
"690rpx"
>
<view
class=
"slot-content"
>
<view
class=
"upload-title"
>
<text
class=
'status-txt'
>
图片上传进度
</text>
</view>
<view
v-if=
"taskCount > 0"
>
<view
class=
"progress-circle"
>
<u-loading
class=
"loading"
v-if=
"!progressStatus"
mode=
"circle"
></u-loading>
<u-circle-progress
v-if=
"progressStatus"
:width=
"320"
:border-width=
"20"
inactive-color=
"#F4F5F7"
:active-color=
"progressColor"
:percent=
"uploadPercentage"
>
<view
:class=
"['u-progress-content',
{'error': uploadStatus === 3}]">
{{
uploadPercentage
}}
%
</view>
</u-circle-progress>
</view>
<view
class=
"u-flex upload-data"
>
<view
class=
"u-flex"
>
<view
class=
"title"
>
需上传
</view>
<view
class=
"pending"
>
{{
taskCount
}}
</view>
</view>
<view
class=
"u-flex"
>
<view
class=
"title"
>
已上传
</view>
<view
class=
"resolve"
>
{{
uploadSuccess
}}
</view>
</view>
<view
class=
"u-flex"
>
<view
class=
"title"
>
状态
</view>
<view
:class=
"['status',
{'error': uploadStatus === 3}]">
{{
uploadStatusName
}}
</view>
</view>
</view>
<view
class=
"upload-bottom"
v-if=
"uploadStatus === 3"
>
<view
class=
"button confirm"
@
click=
"$u.throttle(retry, 500)"
>
重试
</view>
</view>
</view>
<view
class=
"u-flex default"
v-if=
"taskCount === 0"
>
<view><image
class=
"default-img"
:src=
"defaultImg"
></image></view>
<view
class=
"text"
>
当前暂无上传图片
</view>
</view>
</view>
</u-popup>
</view>
</
template
>
<
script
>
/**
* upload-progress 图片上传进度
*/
import
upload
from
'@/components/upload/task.js'
export
default
{
name
:
"upload-progress"
,
data
()
{
return
{
open
:
false
,
progressStatus
:
false
}
},
computed
:
{
icon
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-photo.png'
},
defaultImg
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-default.png'
},
taskCount
()
{
return
this
.
uploadTotal
},
uploadStatusName
()
{
let
status
switch
(
this
.
uploadStatus
)
{
case
1
:
status
=
'等待上传'
break
;
case
2
:
status
=
'上传中'
break
;
case
3
:
status
=
'上传中断'
break
;
}
return
status
},
progressColor
()
{
return
this
.
uploadStatus
===
3
?
'#FA5A49'
:
'#2272FF'
},
uploadPercentage
()
{
const
num
=
this
.
uploadSuccess
const
total
=
this
.
uploadTotal
return
total
>
0
?
Math
.
floor
(
Math
.
round
(
num
/
total
*
10000
)
/
100.00
)
:
0
}
},
watch
:
{
uploadStatus
(
newValue
)
{
this
.
progressStatus
=
false
this
.
$nextTick
(()
=>
{
this
.
progressStatus
=
true
})
}
},
methods
:
{
closePopup
()
{
this
.
progressStatus
=
false
},
openpRrogress
()
{
this
.
open
=
true
this
.
progressStatus
=
false
setTimeout
(()
=>
{
this
.
progressStatus
=
true
},
300
)
},
retry
()
{
if
(
this
.
uploadStatus
!==
2
)
upload
.
uploadImageTask
(
this
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.upload-progress
{
width
:
100%
;
height
:
100%
;
.suspension
{
position
:
fixed
;
right
:
5%
;
bottom
:
20%
;
width
:
80rpx
;
height
:
80rpx
;
border-radius
:
50%
;
background
:
#2272FF
;
z-index
:
999
;
&
.error
{
background
:
#FA5A49
;
}
.progress
{
font-size
:
24rpx
;
color
:
#fff
;
width
:
100%
;
text-align
:
center
;
}
.upload-img
{
width
:
100%
;
text-align
:
center
;
padding-top
:
8rpx
;
.icon
{
width
:
36rpx
;
height
:
32rpx
;
}
}
}
.slot-content
{
padding
:
40rpx
30rpx
30rpx
30rpx
;
.upload-title
{
margin
:
20rpx
0
50rpx
0
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
.status-txt
{
height
:
46rpx
;
font-size
:
40rpx
;
font-weight
:
bold
;
color
:
#333
;
line-height
:
46rpx
;
}
}
.progress-circle
{
width
:
100%
;
height
:
320rpx
;
text-align
:
center
;
.loading
{
line-height
:
320rpx
;
}
.u-progress-content
{
color
:
#2272FF
;
font-size
:
60rpx
;
&
.error
{
color
:
#FA5A49
;
}
}
}
.upload-data
{
margin
:
50rpx
0
30rpx
0
;
.u-flex
{
flex-flow
:
column
;
font-size
:
48rpx
;
width
:
210rpx
;
height
:
120rpx
;
.title
{
color
:
#666
;
font-size
:
28rpx
;
padding-bottom
:
20rpx
;
}
.pending
{
color
:
#333
;
}
.resolve
{
color
:
#2272FF
;
}
.status
{
color
:
#2272FF
;
font-size
:
36rpx
;
&
.error
{
color
:
#FA5A49
;
}
}
}
}
.upload-bottom
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.button
{
text-align
:
center
;
height
:
104rpx
;
width
:
300rpx
;
border-radius
:
52rpx
;
font-size
:
32rpx
;
font-weight
:
600
;
line-height
:
104rpx
;
}
.confirm
{
margin
:
36rpx
30rpx
52rpx
15rpx
;
background
:
#2272FF
;
color
:
#FFFFFF
;
}
}
.default
{
flex-flow
:
column
;
margin
:
150rpx
0
;
.default-img
{
width
:
360rpx
;
height
:
240rpx
;
}
.text
{
color
:
#666
;
font-size
:
28rpx
;
margin-top
:
50rpx
;
}
}
}
}
</
style
>
src/components/upload/index.js
View file @
69848cf5
...
...
@@ -69,14 +69,14 @@ export default {
...
order
}
})
// for (let i = 0; i < files.length; i++) {
// const path = files[i]
// const row = await this.saveFiles(path)
// lists.push(row)
// }
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
uploadTask
))
const
saveLists
=
data
.
concat
(
lists
)
this
.
$u
.
vuex
(
'uploadTask'
,
saveLists
)
const
newTotal
=
this
.
uploadTotal
+
lists
.
length
this
.
$u
.
vuex
(
'uploadTotal'
,
newTotal
)
//this.$u.vuex('uploadSuccess', 0)
return
lists
},
/**
...
...
src/components/upload/task.js
View file @
69848cf5
...
...
@@ -19,10 +19,13 @@ export default {
* 执行任务队列
*/
async
uploadImageTask
(
that
)
{
if
(
that
.
uploadStatus
===
2
)
return
that
.
$u
.
vuex
(
'uploadStatus'
,
2
)
const
uploadTask
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
uploadTask
)).
reverse
()
const
networkType
=
await
getNetworkType
()
const
options
=
{
files
:
uploadTask
,
// 必填 临时文件路径 格式: [{path: "图片地址"}]
files
:
uploadTask
.
slice
(
0
,
5
)
,
// 必填 临时文件路径 格式: [{path: "图片地址"}]
load
:
false
,
//(默认 true 说明:本接口是否提示加载动画)
onEachUpdate
:
res
=>
{
console
.
log
(
"上传成功返回:"
,
res
);
...
...
@@ -41,10 +44,12 @@ export default {
}
uploader
.
qnFileUpload
(
options
).
then
(
res
=>
{
const
newSuccess
=
that
.
uploadSuccess
+
res
.
length
that
.
$u
.
vuex
(
'uploadSuccess'
,
newSuccess
)
this
.
refreshTask
(
that
,
res
)
}).
catch
(
err
=>
{
console
.
log
(
"err"
,
err
)
that
.
$u
.
vuex
(
'uploadStatus'
,
3
)
err
.
mobile
=
that
.
vuex_user
.
mobile
if
(
!
err
.
key
)
err
.
files
=
uploadTask
if
(
!
err
.
orderNumber
)
err
.
orderNumber
=
uploadTask
[
0
].
orderNumber
...
...
@@ -54,6 +59,7 @@ export default {
if
(
err
.
errMsg
&&
(
err
.
errMsg
.
indexOf
(
'fail file not found'
)
!==
-
1
||
err
.
errMsg
.
indexOf
(
'file doesn'
)
!==
-
1
))
{
// 在任务中删除不存在的图片
const
newTask
=
uploadTask
.
filter
(
v
=>
v
.
key
!==
err
.
key
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
this
.
resetProgress
(
that
)
}
})
},
...
...
@@ -66,7 +72,16 @@ export default {
}
})
// uni.setStorageSync('delImg', delImg) // 已上传完的图片,会在启动系统的时候做一次清理
that
.
$u
.
vuex
(
'uploadStatus'
,
1
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
this
.
resetProgress
(
that
)
},
// 重置任务状态
resetProgress
(
that
)
{
if
(
that
.
uploadTask
.
length
===
0
)
{
// 上传完本地所有照片
that
.
$u
.
vuex
(
'uploadSuccess'
,
0
)
that
.
$u
.
vuex
(
'uploadTotal'
,
0
)
that
.
$u
.
vuex
(
'uploadStatus'
,
1
)
}
}
}
src/main.js
View file @
69848cf5
import
Vue
from
'vue'
import
Vue
from
'vue'
import
moment
from
'moment'
import
App
from
'./App'
import
uView
from
"uview-ui"
;
...
...
@@ -8,24 +8,24 @@ import {router,RouterMount} from '@/router/index.js' //路径换成自己的
Vue
.
config
.
productionTip
=
false
Vue
.
mixin
(
vuexStore
)
Vue
.
use
(
uView
);
Vue
.
use
(
uView
);
App
.
mpType
=
'app'
const
app
=
new
Vue
({
store
,
...
App
})
// 引入时间组件 moment
moment
.
locale
(
'zh-cn'
);
Vue
.
prototype
.
moment
=
moment
// 引入时间组件 moment
moment
.
locale
(
'zh-cn'
);
Vue
.
prototype
.
moment
=
moment
Vue
.
filter
(
'datefmt'
,
function
(
input
,
fmtstring
)
{
//当input为时间戳,需转为Number类型
if
(
input
){
return
moment
(
input
).
format
(
fmtstring
);
}
else
{
return
""
;
}
});
});
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
import
httpInterceptor
from
'@/common/http.interceptor.js'
...
...
@@ -33,9 +33,9 @@ Vue.use(httpInterceptor, app)
Vue
.
use
(
router
)
// http接口API抽离,免于写url或者一些固定的参数
import
httpApi
from
'@/common/http.api.js'
Vue
.
use
(
httpApi
,
app
)
// 分享
Vue
.
use
(
httpApi
,
app
)
// 分享
let
mpShare
=
require
(
'@/uview-ui/libs/mixin/mpShare.js'
)
Vue
.
mixin
(
mpShare
)
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
...
...
src/pages.json
View file @
69848cf5
...
...
@@ -162,6 +162,46 @@
"disableScroll"
:
true
}
},
{
"path"
:
"order/index"
,
"style"
:
{
"navigationBarTitleText"
:
"订单管理"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"order/list"
,
"style"
:
{
"navigationBarTitleText"
:
"订单管理-订单列表"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"history/index"
,
"style"
:
{
"navigationBarTitleText"
:
"浏览记录"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"info/index"
,
"style"
:
{
"navigationBarTitleText"
:
"我的资料"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
,
"navigationStyle"
:
"custom"
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
},
{
"path"
:
"wallet/index"
,
"style"
:
{
...
...
src/pages/index/index.vue
View file @
69848cf5
This diff is collapsed.
Click to expand it.
src/pages/index/mine.vue
View file @
69848cf5
...
...
@@ -4,8 +4,7 @@
<u-navbar
:is-back=
"false"
:background=
"
{ background: 'transparent' }" :border-bottom="false">
<text
class=
"title-view"
>
我的
</text>
</u-navbar>
<view
class=
"mine-content"
>
<view
class=
"header-view"
>
<view
class=
"header-view"
>
<view
class=
"header-left-view"
>
<view
class=
"head-image"
>
<image
:style=
"headImageStyle"
:src=
"headImageUrl"
></image>
...
...
@@ -25,11 +24,13 @@
</view>
<view
v-if=
"isSuperuser"
class=
"super-button"
><u-button
@
click=
"handleSuperButton"
>
切换用户
</u-button></view>
</view>
</view>
</view>
<view
class=
"mine-content"
>
<view
class=
"ware-house-view"
>
<view
class=
"ware-house-title"
>
仓配功能
</view>
<view
class=
"ware-house-content"
>
<view
v-for=
"(item, index) in warehouseItems"
:key=
"index"
class=
"ware-house-content-item"
@
click=
"handleClick(item.pathName)"
>
<view
v-for=
"(item, index) in warehouseItems"
:key=
"index"
class=
"ware-house-content-item"
@
click=
"handleClick(item.pathName)"
hover-class=
"u-hover-class"
>
<view
class=
"ware-house-image"
>
<image
:src=
"item.icon"
:style=
"item.imageStyle"
></image>
</view>
...
...
@@ -57,7 +58,6 @@
</
template
>
<
script
>
import
util
from
'@/utils/util.js'
import
login
from
"@/utils/login.js"
;
const
app
=
getApp
();
export
default
{
...
...
@@ -87,6 +87,12 @@
items
()
{
return
[
[{
pathName
:
'order/index'
,
title
:
'订单管理'
,
value
:
''
,
icon
:
'dingdanguanli.png'
,
imageStyle
:
'width:34rpx;height:32rpx'
},{
pathName
:
'wallet/index'
,
title
:
'我的钱包'
,
value
:
''
,
...
...
@@ -94,26 +100,21 @@
imageStyle
:
'width:34rpx;height:32rpx'
},
{
pathName
:
'
deposit
/index'
,
title
:
'
配件押金
'
,
pathName
:
'
info
/index'
,
title
:
'
我的资料
'
,
value
:
''
,
icon
:
'
yajin
.png'
,
icon
:
'
wodeziliao
.png'
,
imageStyle
:
'width:32rpx;height:32rpx'
},
{
pathName
:
'
contract
/index'
,
title
:
'
我的合同
'
,
pathName
:
'
history
/index'
,
title
:
'
浏览记录
'
,
value
:
''
,
icon
:
'
hetong
.png'
,
icon
:
'
liulanjilu
.png'
,
imageStyle
:
'width:34rpx;height:32rpx'
},
{
pathName
:
'cert/index'
,
title
:
'我的证件'
,
value
:
''
,
icon
:
'zhengjian.png'
,
imageStyle
:
'width:36rpx;height:28rpx'
}],[
],
[
{
pathName
:
'address/index'
,
title
:
'收货地址'
,
...
...
@@ -121,13 +122,6 @@
icon
:
'wddizhi.png'
,
imageStyle
:
'width:32rpx;height:32rpx'
},
// {
// pathName: 'warehouse',
// title: '我的仓库',
// value: '',
// icon: 'cangku.png',
// imageStyle: 'width:36rpx;height:32rpx'
// },
{
pathName
:
'customer/index'
,
title
:
'联系客服'
,
...
...
@@ -148,7 +142,7 @@
},
{
pathName
:
'warehouse/spare'
,
title
:
'
物料
库'
,
title
:
'
备件
库'
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'wodebeijian.png'
,
imageStyle
:
'width:60rpx;height:54rpx'
...
...
@@ -183,6 +177,12 @@
},
shezhiImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'shezhi.png'
},
liulanjilumage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'liulanjilu.png'
},
wodeziliaoImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'wodeziliao.png'
},
isSuperuser
()
{
return
this
.
vuex_superuser
...
...
@@ -264,9 +264,9 @@
.mine-view
{
position
:
relative
;
height
:
100vh
;
overflow
:
auto
;
display
:
flex
;
background-color
:
#F4F5F7
;
flex-direction
:
column
;
.header-image
{
position
:
absolute
;
width
:
100%
;
...
...
@@ -279,19 +279,18 @@
font-size
:
40rpx
;
padding-left
:
30rpx
;
}
.mine-content
{
position
:
relative
;
padding
:
26rpx
30rpx
30rpx
20rpx
;
.header-view
{
display
:
flex
;
align-items
:
flex-start
;
justify-content
:
space-between
;
margin-bottom
:
60rpx
;
// margin-bottom: 60rpx;
padding
:
26rpx
30rpx
60rpx
30rpx
;
.header-left-view
{
display
:
flex
;
align-items
:
center
;
.head-image
{
z-index
:
1
;
width
:
120rpx
;
height
:
120rpx
;
background-color
:
#FFFFFF
;
...
...
@@ -338,6 +337,7 @@
}
}
.header-right-view
{
z-index
:
1
;
.setting-view
{
display
:
flex
;
justify-content
:
flex-end
;
...
...
@@ -358,6 +358,14 @@
}
}
}
.mine-content
{
height
:
100%
;
overflow
:
auto
;
position
:
relative
;
padding-bottom
:
30rpx
;
margin
:
0rpx
30rpx
;
border-radius
:
12rpx
;
.ware-house-view
{
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
...
...
@@ -389,13 +397,10 @@
align-items
:
center
;
}
}
}
}
.list-view
{
.group-view
{
margin-top
:
20rpx
;
background-color
:
#FFFFFF
;
...
...
@@ -419,10 +424,8 @@
margin
:
30rpx
;
}
}
}
}
}
.logout
{
padding
:
20rpx
;
...
...
src/pages/index/order.vue
View file @
69848cf5
This diff is collapsed.
Click to expand it.
src/pages/mine/cert/index.vue
View file @
69848cf5
...
...
@@ -128,11 +128,6 @@
this
.
isRuZhu
=
false
;
});
},
onUnload
()
{
uni
.
switchTab
({
url
:
'/pages/index/mine'
});
},
methods
:
{
isUpload
(
typeBool
)
{
return
typeBool
?
'已上传'
:
'未上传'
...
...
src/pages/mine/contract/index.vue
View file @
69848cf5
<
template
>
<view
class=
"contract"
>
<u-navbar
title=
"我的合同"
b:is-back=
"false"
:background=
"background"
:border-bottom=
"false"
></u-navbar>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"我的合同"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"content"
>
<view
v-if=
"res.length > 0"
>
<text
class=
"title"
>
合同清单
</text>
...
...
src/pages/mine/history/index.vue
0 → 100644
View file @
69848cf5
<
template
>
<view
class=
"history-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
:title=
"title"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"none-view"
v-if=
"noneHistory"
>
<NoOrder
text=
"当前暂无浏览记录"
:customStyle=
"customStyle"
imageName=
"zhangdan.png"
/>
</view>
<template
v-else
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<template
v-else
>
<view
class=
"head-view"
>
<image
:src=
"chakanjiluImage"
class=
"back-image"
mode=
"widthFix"
></image>
<view
class=
"head-info"
>
<view>
最近查看记录
</view>
<view
class=
"head-message"
>
最近查看或操作过的5条订单
</view>
</view>
</view>
<view
class=
"content-view"
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:location=
"[]"
model=
"simple"
@
click=
"handleClickCell"
@
action=
"handleClickButton"
>
</OrderCell>
</view>
<view
class=
"bottom-tip"
>
<u-loadmore
:status=
"nomore"
font-size=
"26"
color=
"#999999"
></u-loadmore>
</view>
</view>
</
template
>
</template>
</view>
</template>
<
script
>
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
export
default
{
components
:
{
OrderCell
,
NoOrder
,
},
props
:
{
visible
:
{
type
:
Boolean
,
default
:
false
,
},
},
data
()
{
return
{
loaded
:
false
,
orderList
:
[],
}
},
computed
:
{
title
()
{
return
this
.
noneHistory
?
'浏览记录'
:
' '
},
noneHistory
()
{
return
this
.
orderList
.
length
<=
0
&&
this
.
loaded
},
idList
()
{
return
this
.
vuex_last_five_orders
.
filter
((
id
)
=>
id
)
||
[]
},
chakanjiluImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'chakanjilu-y.png'
},
customStyle
()
{
return
'background-color: #F4F5F7'
},
},
onLoad
()
{
getApp
().
trackPage
(
'浏览记录'
)
this
.
listOrderByIds
()
},
methods
:
{
listOrderByIds
()
{
this
.
$u
.
api
.
listOrderByIds
(
this
.
$u
.
queryParams
({
ids
:
this
.
idList
},
true
,
'repeat'
)
)
.
then
((
res
)
=>
{
this
.
loaded
=
true
if
(
res
.
code
==
200
)
{
this
.
orderList
=
res
.
data
}
else
{
console
.
log
(
res
.
message
,
'获取订单详情失败!'
)
}
})
},
handleClickCell
(
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
,
})
},
handleClickButton
(
item
)
{
uni
.
navigateTo
({
url
:
'pages/order/complete?orderId='
+
item
.
orderId
+
'&categoryId='
+
item
.
categoryId
+
'&orderServiceType='
+
item
.
orderServiceType
+
'&inGuaranteePeriod='
+
item
.
inGuaranteePeriod
+
'&partnerCompanyId='
+
item
.
partnerCompanyId
+
'&maintainStep='
+
item
.
maintainStep
+
'&orderStatus='
+
item
.
orderStatus
+
'&brandId='
+
item
.
lianbaoBrandId
+
'&auditResults='
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
).
join
()
:
''
),
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.history-view
{
display
:
flex
;
flex-direction
:
column
;
height
:
100vh
;
.none-view
{
margin-top
:
140rpx
;
}
.head-view
{
display
:
relative
;
.back-image
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
z-index
:
-1
;
}
.head-info
{
padding
:
0
30rpx
20rpx
30rpx
;
font-size
:
48rpx
;
font-weight
:
bold
;
color
:
#333333
;
.head-message
{
font-size
:
32rpx
;
color
:
#2272ff
;
font-weight
:
400
;
margin-top
:
14rpx
;
}
}
}
.loading-view
{
width
:
100%
;
background-color
:
transparent
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
top
:
50%
;
left
:
0
;
position
:
fixed
;
}
.content-view
{
height
:
100%
;
overflow
:
auto
;
.bottom-tip
{
margin-bottom
:
44rpx
;
margin-top
:
30rpx
;
}
}
}
</
style
>
src/pages/mine/info/index.vue
0 → 100644
View file @
69848cf5
<
template
>
<view
class=
"info-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"我的资料"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"list-view"
>
<view
v-for=
"(group, ind) in items"
:key=
"ind"
class=
"group-view"
>
<u-cell-group
:border=
"false"
>
<view
v-for=
"(item, index) in group"
:key=
"index"
>
<u-cell-item
:value=
"item.value"
@
click=
"handleClick(item.pathName)"
>
<image
slot=
"icon"
:src=
"item.icon"
:style=
"item.imageStyle"
></image>
<view
slot=
"title"
class=
"item-title"
>
{{
item
.
title
}}
</view>
<view
slot=
"value"
class=
"item-value"
>
{{
value
}}
</view>
</u-cell-item>
</view>
</u-cell-group>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{}
},
computed
:
{
items
()
{
return
[
[
{
pathName
:
'deposit/index'
,
title
:
'配件押金'
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'yajin.png'
,
imageStyle
:
'width:32rpx;height:32rpx'
,
},
{
pathName
:
'contract/index'
,
title
:
'我的合同'
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'hetong.png'
,
imageStyle
:
'width:34rpx;height:32rpx'
,
},
{
pathName
:
'cert/index'
,
title
:
'我的证件'
,
value
:
''
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'zhengjian.png'
,
imageStyle
:
'width:36rpx;height:28rpx'
,
},
],
]
},
},
onLoad
()
{
getApp
().
trackPage
(
'我的资料'
)
},
methods
:
{
handleClick
(
path
)
{
this
.
$u
.
route
({
url
:
'pages/mine/'
+
path
,
})
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.info-view
{
position
:
relative
;
height
:
100vh
;
display
:
flex
;
background-color
:
#f4f5f7
;
flex-direction
:
column
;
.list-view
{
height
:
100%
;
overflow
:
auto
;
.group-view
{
margin-top
:
20rpx
;
background-color
:
#ffffff
;
border-radius
:
12rpx
;
overflow
:
hidden
;
.item-title
{
font-size
:
32rpx
;
color
:
#333333
;
margin-left
:
16rpx
;
line-height
:
32rpx
;
}
.item-value
{
font-size
:
26rpx
;
color
:
#999999
;
}
.line-view
{
height
:
2rpx
;
background-color
:
#f4f5f7
;
margin
:
30rpx
;
}
}
}
}
</
style
>
src/pages/mine/order/index.vue
0 → 100644
View file @
69848cf5
<
template
>
<view
class=
"order-manage-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"订单管理"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"body-view"
>
<view
class=
"header-view"
>
<view
class=
"title-view"
>
工作数据
</view>
<view
class=
"time-view"
>
<u-tabs
height=
"56"
activeColor=
"#2272FF"
bg-color=
"none"
inactive-color=
"#999"
bar-height=
"4"
bar-width=
"44"
:offset=
"offset"
:list=
"timeTypeTexts"
:current=
"current"
@
change=
"change"
:is-scroll=
"false"
font-size=
"26"
bold
></u-tabs>
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"content-view"
>
<view
v-for=
"(item, index) in detailLabels"
:key=
"index"
class=
"item-view"
>
<view
class=
"left-view"
@
click=
"handleClick(index)"
hover-class=
"u-hover-class"
>
<view
:class=
"[
'count-view',
{ active: currentClicks[current][item.type] },
]"
>
{{
info
[
item
.
key
]
||
0
}}
</view
>
<view
>
{{
item
.
label
}}
<u-icon
class=
"arrow-icon"
name=
"arrow-right"
color=
"#cccccc"
></u-icon
></view>
</view>
</view>
</view>
<view>
<u-toast
ref=
"uToast"
/>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
info
:
{},
offset
:
[
0
,
0
],
current
:
0
,
currentClicks
:
[],
}
},
computed
:
{
timeTypeTexts
()
{
return
[
{
name
:
'今日'
},
{
name
:
'昨日'
},
{
name
:
'本周'
},
{
name
:
'本月'
},
]
// return { today: '今日', yesterday: '昨日', week: '本周', month: '本月' }
},
detailLabels
()
{
return
[
{
label
:
'已接单'
,
type
:
'take'
,
key
:
'acceptedCount'
},
{
label
:
'已签到'
,
type
:
'checkin'
,
key
:
'checkedCount'
},
{
label
:
'已提交完工'
,
type
:
'finish'
,
key
:
'finishedCount'
},
]
},
params
()
{
var
date
=
new
Date
()
var
timestamp
=
date
.
getTime
()
var
today
=
this
.
$u
.
timeFormat
(
timestamp
,
'yyyy-mm-dd'
)
var
yesterday
=
this
.
$u
.
timeFormat
(
date
.
setDate
(
date
.
getDate
()
-
1
))
date
=
new
Date
()
var
weekDays
=
[
6
,
0
,
1
,
2
,
3
,
4
,
5
]
var
week
=
this
.
$u
.
timeFormat
(
date
.
setDate
(
date
.
getDate
()
-
weekDays
[
date
.
getDay
()])
)
date
=
new
Date
()
var
month
=
this
.
$u
.
timeFormat
(
date
.
setDate
(
1
))
return
[
{
start
:
today
,
end
:
today
},
{
start
:
yesterday
,
end
:
yesterday
},
{
start
:
week
,
end
:
today
},
{
start
:
month
,
end
:
today
},
]
},
currentParam
()
{
return
this
.
params
[
this
.
current
]
},
clicks
()
{
return
{
take
:
false
,
checkin
:
false
,
finish
:
false
}
},
},
onLoad
()
{
this
.
currentClicks
=
this
.
clicks
},
onShow
()
{
this
.
getOrderCount
()
},
methods
:
{
// 获取订单数量
getOrderCount
()
{
this
.
$u
.
api
.
manageOrderCount
(
this
.
currentParam
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
)
{
this
.
info
=
res
.
data
||
{}
}
}
else
{
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
}
})
},
change
(
index
)
{
this
.
current
=
index
this
.
getOrderCount
()
},
handleClick
(
index
)
{
var
item
=
this
.
detailLabels
[
index
]
this
.
currentClicks
=
[
{
...
this
.
clicks
},
{
...
this
.
clicks
},
{
...
this
.
clicks
},
{
...
this
.
clicks
},
]
this
.
currentClicks
[
this
.
current
][
item
.
type
]
=
true
if
(
this
.
info
[
item
.
key
]
>
0
)
{
this
.
$u
.
route
({
url
:
'pages/mine/order/list'
,
params
:
{
orderType
:
item
.
type
,
title
:
this
.
timeTypeTexts
[
this
.
current
].
name
+
'-'
+
item
.
label
,
...
this
.
currentParam
,
},
})
}
else
{
this
.
$refs
.
uToast
.
show
({
title
:
'暂无数据'
,
type
:
'warning'
,
})
}
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.order-manage-view
{
.body-view
{
background-color
:
#ffffff
;
margin
:
20rpx
30rpx
;
border-radius
:
12rpx
;
padding
:
20rpx
30rpx
;
.header-view
{
display
:
flex
;
justify-content
:
space-between
;
.title-view
{
font-size
:
32rpx
;
color
:
#333333
;
font-weight
:
bold
;
display
:
flex
;
align-items
:
center
;
}
.time-view
{
width
:
300rpx
;
}
}
.line-view
{
width
:
100%
;
background-color
:
#f4f5f7
;
height
:
2rpx
;
margin
:
30rpx
0
;
}
.content-view
{
display
:
flex
;
align-self
:
center
;
justify-content
:
space-around
;
padding
:
54rpx
0
;
.item-view
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
.left-view
{
text-align
:
center
;
color
:
#666666
;
font-size
:
28rpx
;
width
:
180rpx
;
.count-view
{
font-weight
:
bold
;
font-size
:
52rpx
;
margin-bottom
:
20rpx
;
color
:
#333333
;
&
.active
{
color
:
#2272ff
;
}
}
.arrow-icon
{
margin-left
:
4rpx
;
}
}
}
}
}
}
</
style
>
src/pages/mine/order/list.vue
0 → 100644
View file @
69848cf5
<
template
>
<view
class=
"list-view"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
:title=
"title"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<view
class=
"content-view"
>
<scroll-view
@
scrolltolower=
"reachBottom"
scroll-anchoring
enable-back-to-top
refresher-background=
"#F4F5F7"
>
<view
class=
"loading-view"
v-if=
"!loaded"
>
<u-loading
mode=
"flower"
></u-loading>
</view>
<NoOrder
v-else-if=
"noMore"
imageName=
"zwdd.png"
:customStyle=
"noOrderCustomStyle"
/>
<template
v-else
>
<view
v-for=
"item in orderList"
:key=
"item.orderId"
>
<OrderCell
:orderData=
"item"
:location=
"dataValue"
@
click=
"handleClick"
@
action=
"handleClickCellButton"
>
</OrderCell>
</view>
<view
class=
"load-more-view"
v-show=
"(pageNumber == 1 && loaded) || pageNumber > 1"
>
<u-loadmore
:status=
"loadStatus"
bgColor=
"#F4F5F7"
></u-loadmore>
</view>
</
template
>
</scroll-view>
</view>
</view>
</template>
<
script
>
import
OrderCell
from
'@/components/order/index.vue'
import
NoOrder
from
'@/components/order/noOrder.vue'
export
default
{
components
:
{
OrderCell
,
NoOrder
,
},
data
()
{
return
{
pageNumber
:
0
,
pageSize
:
10000
,
// 因为需要排序,所以暂时去掉分页
orderList
:
[],
loadStatus
:
'loading'
,
dataValue
:
[],
loaded
:
false
,
title
:
''
,
orderType
:
''
,
timeParam
:
{},
}
},
computed
:
{
noMore
()
{
return
this
.
orderList
.
length
==
0
&&
this
.
loaded
},
noOrderCustomStyle
()
{
return
'margin-top: 100rpx;background-color: #F4F5F7'
},
sortType
()
{
return
{
take
:
'acceptOrderDateTime'
,
checkin
:
'checkInDateTime'
,
finish
:
'orderFinishDatetime'
,
}
},
currentSorTtype
()
{
return
this
.
sortType
[
this
.
orderType
]
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'订单首页'
)
if
(
e
&&
e
.
title
)
{
this
.
title
=
decodeURIComponent
(
e
.
title
)
}
if
(
e
&&
e
.
orderType
)
{
this
.
orderType
=
e
.
orderType
}
if
(
e
&&
e
.
start
&&
e
.
end
)
{
this
.
timeParam
=
{
start
:
e
.
start
,
end
:
e
.
end
}
}
this
.
reloadOrderList
()
},
methods
:
{
reachBottom
(
e
)
{
if
(
this
.
loadStatus
!=
'loadmore'
)
return
this
.
loadStatus
==
'loading'
this
.
getOrderList
()
},
// 页面数据
getOrderList
()
{
// 状态处理
this
.
pageNumber
+=
1
if
(
this
.
pageNumber
==
1
)
{
this
.
loaded
=
false
}
var
param
=
{
pageNumber
:
this
.
pageNumber
,
pageSize
:
this
.
pageSize
,
keyword
:
''
,
type
:
this
.
orderType
,
...
this
.
timeParam
,
}
this
.
$u
.
api
.
manageOrderList
(
param
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
this
.
pageNumber
==
1
)
{
this
.
orderList
=
[]
}
if
(
res
.
data
.
list
)
{
this
.
orderList
.
push
(...
res
.
data
.
list
)
this
.
orderList
.
sort
((
x
,
y
)
=>
{
return
(
x
[
this
.
currentSorTtype
]
||
0
)
<
(
y
[
this
.
currentSorTtype
]
||
0
)
?
1
:
-
1
})
this
.
loadStatus
=
res
.
data
.
total
>
this
.
orderList
.
length
&&
res
.
data
.
list
.
length
==
this
.
pageSize
?
'loadmore'
:
'nomore'
}
}
else
{
console
.
log
(
res
.
message
,
'获取订单数量失败!'
)
}
this
.
loaded
=
true
})
},
handleClickCellButton
(
item
)
{
// 去完工
uni
.
navigateTo
({
url
:
'pages/order/complete?orderId='
+
item
.
orderId
+
'&categoryId='
+
item
.
categoryId
+
'&orderServiceType='
+
item
.
orderServiceType
+
'&inGuaranteePeriod='
+
item
.
inGuaranteePeriod
+
'&partnerCompanyId='
+
item
.
partnerCompanyId
+
'&maintainStep='
+
item
.
maintainStep
+
'&orderStatus='
+
item
.
orderStatus
+
'&brandId='
+
item
.
lianbaoBrandId
+
'&auditResults='
+
(
item
.
auditResults
?
Object
.
keys
(
item
.
auditResults
).
join
()
:
''
),
})
},
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
,
})
},
reloadOrderList
()
{
this
.
pageNumber
=
0
this
.
loadStatus
=
'loading'
this
.
getOrderList
()
},
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.list-view
{
height
:
100vh
;
overflow
:
auto
;
display
:
flex
;
flex-direction
:
column
;
.content-view
{
height
:
100%
;
overflow
:
auto
;
padding
:
20rpx
30rpx
;
.load-more-view
{
padding-bottom
:
44rpx
;
}
.loading-view
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
left
:
0
;
margin-top
:
300rpx
;
position
:
absolute
;
}
}
}
</
style
>
src/pages/mine/setting/index.vue
View file @
69848cf5
...
...
@@ -29,7 +29,7 @@
{
pathName
:
'about'
,
title
:
'当前版本'
,
value
:
process
.
uniEnv
.
version
,
value
:
process
.
uniEnv
.
version
_number
,
icon
:
process
.
uniEnv
.
qn_base_url
+
'version.png'
,
imageStyle
:
'width:32rpx;height:32rpx'
}
...
...
src/pages/mine/wallet/settlement.vue
View file @
69848cf5
...
...
@@ -13,10 +13,13 @@
</view>
</picker>
</view>
<view
class=
"head-bottom-view"
>
<view
class=
"head-bottom-view
u-flex u-row-between
"
>
<view
class=
"head-amount-view"
>
<view><text>
已结算金额(元)
</text></view>
<view
class=
"head-amount-text"
><text>
{{
info
.
totalAmount
}}
</text></view>
<view
class=
"head-amount-text"
><text>
{{
info
.
totalAmount
||
0
}}
</text></view>
<!--
<view
class=
"head-amount-view"
>
<view><text>
待结算金额(元)
</text></view>
<view
class=
"head-amount-text"
><text>
{{
info
.
waitPaidAmount
||
0
}}
</text></view>
-->
</view>
</view>
</view>
...
...
@@ -46,7 +49,7 @@
let
now
=
new
Date
(
new
Date
().
toLocaleDateString
()).
getTime
();
import
util
from
'@/utils/util.js'
import
Settlement
from
"@/components/mine/settlement.vue"
const
baseinfo
=
{
totalAmount
:
0
,
payableRecordExtendDtos
:
[]}
const
baseinfo
=
{
totalAmount
:
0
,
waitPaidAmount
:
0
,
payableRecordExtendDtos
:
[]}
export
default
{
components
:
{
Settlement
...
...
@@ -58,7 +61,7 @@
date
:
''
,
params
:
{
payableRecordStatus
:
null
,
starDate
:
null
,
star
t
Date
:
null
,
endDate
:
null
,
},
}
...
...
@@ -88,9 +91,9 @@
self
.
loading
=
true
let
startTime
=
self
.
moment
(
self
.
date
).
format
(
'YYYY-MM-DD'
)
let
endTime
=
self
.
moment
(
self
.
date
).
endOf
(
'month'
).
format
(
'YYYY-MM-DD'
)
self
.
params
.
starDate
=
startTime
self
.
params
.
star
t
Date
=
startTime
self
.
params
.
endDate
=
endTime
let
res
=
await
self
.
$u
.
api
.
payableRecord
(
self
.
params
)
let
res
=
await
self
.
$u
.
api
.
listPayableRecordByPayTime
(
self
.
params
)
self
.
loading
=
false
if
(
res
&&
res
.
code
==
200
)
{
self
.
info
=
res
.
data
&&
res
.
data
[
self
.
date
]
||
baseinfo
...
...
src/pages/mine/warehouse/index.vue
View file @
69848cf5
...
...
@@ -318,7 +318,7 @@
.fixed-button
{
position
:
fixed
;
right
:
2
0rpx
;
right
:
1
0rpx
;
bottom
:
64rpx
;
}
...
...
src/pages/order/complete.vue
View file @
69848cf5
...
...
@@ -63,7 +63,9 @@
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"
((item.fieldsName != 'actualPaid' && item.fieldsName != 'eSerialNum') || show200) &&
((item.fieldsName != 'actualPaid' &&
item.fieldsName != 'eSerialNum') ||
show200) &&
((readOnly &&
!$u.test.isEmpty(form[item.fieldsName])) ||
!readOnly)
...
...
@@ -315,6 +317,7 @@
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
<upload-progress
/>
</view>
</template>
<
script
>
...
...
@@ -598,6 +601,22 @@ export default {
this
.
form
.
paymentMethodsType
&&
this
.
form
.
paymentMethodsType
!=
'03'
)
},
// 从订单管理和浏览记录进来,不跳转到订单列表,而是后退到订单管理和浏览记录
completeBack
()
{
let
pages
=
getCurrentPages
()
var
i
=
0
for
(
var
item
of
pages
)
{
if
(
[
'/pages/mine/history/index'
,
'/pages/mine/order/index'
].
indexOf
(
item
.
$page
?.
fullPath
.
split
(
'?'
)[
0
]
)
!=
-
1
)
{
return
pages
.
length
-
i
-
1
}
i
++
}
return
0
},
},
methods
:
{
getCompleteData
()
{
...
...
@@ -872,9 +891,16 @@ export default {
async
appointment
()
{
const
save
=
await
this
.
nextStepSaveData
()
if
(
save
)
{
uni
.
reLaunch
({
url
:
'/pages/index/order?type=0'
,
})
if
(
this
.
completeBack
)
{
// 从订单管理和浏览记录进来
uni
.
navigateBack
({
delta
:
this
.
completeBack
,
})
}
else
{
uni
.
reLaunch
({
url
:
'/pages/index/order?type=waitAppointment'
,
})
}
}
},
// 下一步动作
...
...
@@ -1008,9 +1034,16 @@ export default {
title
:
'提交成功'
,
type
:
'success'
,
callback
:
()
=>
{
uni
.
reLaunch
({
url
:
'/pages/index/order?type=3'
,
})
if
(
this
.
completeBack
)
{
// 从订单管理和浏览记录进来
uni
.
navigateBack
({
delta
:
this
.
completeBack
,
})
}
else
{
uni
.
reLaunch
({
url
:
'/pages/index/order?type=audit'
,
})
}
},
})
}
else
{
...
...
@@ -1029,9 +1062,16 @@ export default {
title
:
'提交成功'
,
type
:
'success'
,
callback
:
()
=>
{
uni
.
reLaunch
({
url
:
'/pages/index/order?type=3'
,
})
if
(
this
.
completeBack
)
{
// 从订单管理和浏览记录进来
uni
.
navigateBack
({
delta
:
this
.
completeBack
,
})
}
else
{
uni
.
reLaunch
({
url
:
'/pages/index/order?type=audit'
,
})
}
},
})
}
else
{
...
...
@@ -1102,10 +1142,14 @@ export default {
if
(
innerItem
.
fieldsName
===
'paymentMethodsType'
)
{
// 选不需要收款的时候,收款金额修改为非必选
const
actualPaid
=
groupItem
.
items
.
find
((
v
)
=>
v
.
fieldsName
===
'actualPaid'
)
const
actualPaid
=
groupItem
.
items
.
find
(
(
v
)
=>
v
.
fieldsName
===
'actualPaid'
)
actualPaid
.
required
=
data
.
value
!=
'03'
const
eSerialNum
=
groupItem
.
items
.
find
((
v
)
=>
v
.
fieldsName
===
'eSerialNum'
)
const
eSerialNum
=
groupItem
.
items
.
find
(
(
v
)
=>
v
.
fieldsName
===
'eSerialNum'
)
eSerialNum
.
required
=
data
.
value
!=
'03'
}
...
...
src/pages/order/detail.vue
View file @
69848cf5
...
...
@@ -548,11 +548,7 @@ export default {
loadOrderDetail
()
{
// 获取工单详情
let
self
=
this
let
timestamp
=
new
Date
().
getTime
()
var
data
=
{
orderId
:
self
.
orderId
,
}
self
.
$u
.
api
.
orderDetail
(
data
,
self
.
orderId
).
then
((
res
)
=>
{
self
.
$u
.
api
.
orderDetail
({},
self
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
self
.
order
=
res
.
data
this
.
setOrderType
()
...
...
src/pages/order/search.vue
View file @
69848cf5
This diff is collapsed.
Click to expand it.
src/pages/photo/list.vue
View file @
69848cf5
...
...
@@ -23,8 +23,10 @@
<!--
<text
class=
"rightContent u-m-t-14 u-m-l-30 u-p-b-30"
>
{{
item
.
describe
}}
</text>
-->
</view>
<view
class=
"rightImageView"
v-if=
"item.orderImages && item.orderImages.length > 0"
>
<image
class=
"rightImage"
v-for=
"(image, index) in item.orderImages"
:src=
"image"
:key=
"index"
@
click
.
stop=
"handleClickImage(item, index)"
mode=
"aspectFill"
></image>
<u-image
class=
"rightImage"
v-for=
"(image, index) in item.orderImages"
:src=
"image + '?imageView2/1/w/100/h/100/q/75'"
:key=
"index"
@
tap
.
stop=
"handleClickImage(item, index)"
width=
"116"
height=
"116"
>
<view
slot=
"error"
style=
"font-size: 24rpx;"
>
上传中
</view>
</u-image>
</view>
</view>
</
template
>
...
...
@@ -419,8 +421,8 @@
.rightImage
{
background-color
:
#F3F3F3
;
width
:
116
rpx
;
height
:
116
rpx
;
/*
width: 116rpx;
height: 116rpx;
*/
margin
:
0
rpx
12
rpx
12
rpx
0
rpx
;
}
...
...
src/plugins/uploader/index.js
View file @
69848cf5
...
...
@@ -183,10 +183,10 @@ uploader.requestError = function(e) {
if
(
e
.
statusCode
===
0
)
{
throw
e
;
}
else
{
uni
.
showToast
({
title
:
"当前网络信号较差,请耐心等待或尝试切换网络环境"
,
icon
:
"none"
});
//
uni.showToast({
//
title: "当前网络信号较差,请耐心等待或尝试切换网络环境",
//
icon: "none"
//
});
}
}
export
default
uploader
;
src/store/index.js
View file @
69848cf5
...
...
@@ -12,7 +12,7 @@ try {
}
// 需要永久存储,且下次APP启动需要取出的,在state中的变量名
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_wx_uid'
,
'vuex_token'
,
'vuex_cache'
,
'uploadTask'
,
'vuex_superuser'
];
let
saveStateKeys
=
[
'vuex_user'
,
'vuex_wx_uid'
,
'vuex_token'
,
'vuex_cache'
,
'uploadTask'
,
'
uploadTotal'
,
'uploadSuccess'
,
'
vuex_superuser'
];
// 保存变量到本地存储中
const
saveLifeData
=
function
(
key
,
value
)
{
...
...
@@ -34,6 +34,7 @@ const store = new Vuex.Store({
vuex_token
:
lifeData
.
vuex_token
?
lifeData
.
vuex_token
:
''
,
vuex_cache
:
lifeData
.
vuex_cache
?
lifeData
.
vuex_cache
:
{},
vuex_superuser
:
lifeData
.
vuex_superuser
||
false
,
vuex_last_five_orders
:
lifeData
.
vuex_last_five_orders
?
lifeData
.
vuex_last_five_orders
:
[],
vuex_version
:
'1.0.1'
,
vuex_config
:
{},
// 入驻信息
...
...
@@ -42,7 +43,13 @@ const store = new Vuex.Store({
// 授权用户信息
vuex_auth_user
:
{},
// 上传队列
uploadTask
:
lifeData
.
uploadTask
?
lifeData
.
uploadTask
:
[]
uploadTask
:
lifeData
.
uploadTask
?
lifeData
.
uploadTask
:
[],
// 上传状态 1 未开始 2 上传中 3 上传中断
uploadStatus
:
1
,
// 上传总数量
uploadTotal
:
lifeData
.
uploadTotal
?
lifeData
.
uploadTotal
:
0
,
// 已上传数量
uploadSuccess
:
lifeData
.
uploadSuccess
?
lifeData
.
uploadSuccess
:
0
,
},
mutations
:
{
$uStore
(
state
,
payload
)
{
...
...
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