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
8b973759
Commit
8b973759
authored
May 20, 2021
by
linwenqing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/test'
parents
a881e5b5
798236c6
Changes
18
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
488 additions
and
325 deletions
+488
-325
.env.dev.js
.env.dev.js
+2
-1
.env.js
.env.js
+3
-3
.env.prod.js
.env.prod.js
+2
-1
.env.test.js
.env.test.js
+2
-1
App.vue
src/App.vue
+1
-1
order.js
src/common/api/order.js
+5
-1
XhFiles.vue
src/components/createCom/XhFiles.vue
+26
-31
XhSelect.vue
src/components/createCom/XhSelect.vue
+36
-10
XhServiceMeasure.vue
src/components/createCom/XhServiceMeasure.vue
+38
-6
XhTime.vue
src/components/createCom/XhTime.vue
+15
-16
readme.md
src/components/take/readme.md
+8
-1
index.js
src/components/upload/index.js
+6
-4
index.js
src/config/index.js
+1
-1
index.vue
src/pages/mine/wallet/index.vue
+1
-1
statement.vue
src/pages/mine/wallet/statement.vue
+1
-1
complete.vue
src/pages/order/complete.vue
+205
-191
detail.vue
src/pages/order/detail.vue
+121
-47
list.vue
src/pages/photo/list.vue
+15
-8
No files found.
.env.dev.js
View file @
8b973759
...
@@ -10,5 +10,6 @@ const UNI_APP = {
...
@@ -10,5 +10,6 @@ const UNI_APP = {
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
qn_asset_url
:
'http://deudn.c.pp.cc/'
,
argoDebugMode
:
1
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
.env.js
View file @
8b973759
;
;
(
function
()
{
(
function
()
{
let
NODE_ENV
=
'
prod
'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'
test
'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
let
ENV_VAR
=
null
;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
}
}
}
else
if
(
process
.
env
.
NODE_ENV
===
"production"
)
{
}
else
if
(
process
.
env
.
NODE_ENV
===
"production"
)
{
ENV_VAR
=
require
(
'./.env.prod.js'
);
//
ENV_VAR = require('./.env.prod.js');
//
ENV_VAR = require('./.env.test.js');
ENV_VAR
=
require
(
'./.env.test.js'
);
}
}
if
(
ENV_VAR
)
{
if
(
ENV_VAR
)
{
process
.
uniEnv
=
{};
process
.
uniEnv
=
{};
...
...
.env.prod.js
View file @
8b973759
...
@@ -8,7 +8,8 @@ const UNI_APP = {
...
@@ -8,7 +8,8 @@ const UNI_APP = {
apiUrl
:
'https://system.banshouhui.com'
,
//java端域名请求头
apiUrl
:
'https://system.banshouhui.com'
,
//java端域名请求头
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
argoDebugMode
:
0
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
.env.test.js
View file @
8b973759
...
@@ -8,6 +8,7 @@ const UNI_APP = {
...
@@ -8,6 +8,7 @@ const UNI_APP = {
apiUrl
:
'https://system.dev.banshouhui.com'
,
//java端域名请求头
apiUrl
:
'https://system.dev.banshouhui.com'
,
//java端域名请求头
},
},
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_base_url
:
'https://qn-static.banshouhui.com/self-support/'
,
qn_asset_url
:
'https://qn-static.banshouhui.com'
qn_asset_url
:
'https://qn-static.banshouhui.com'
,
argoDebugMode
:
1
}
}
module
.
exports
=
UNI_APP
;
module
.
exports
=
UNI_APP
;
src/App.vue
View file @
8b973759
...
@@ -245,7 +245,7 @@ export default {
...
@@ -245,7 +245,7 @@ export default {
let
userInfo
=
{
let
userInfo
=
{
mobile
:
user
.
mobile
,
mobile
:
user
.
mobile
,
userfrom_id
:
user
.
uid
,
userfrom_id
:
user
.
uid
,
userfrom
:
"
家维广场
"
,
userfrom
:
"
自营平台
"
,
avatar
:
user
.
avatar
,
avatar
:
user
.
avatar
,
nickname
:
user
.
nickname
,
nickname
:
user
.
nickname
,
username
:
user
.
username
,
username
:
user
.
username
,
...
...
src/common/api/order.js
View file @
8b973759
...
@@ -40,7 +40,10 @@ let orderApiFun = function(vm){
...
@@ -40,7 +40,10 @@ let orderApiFun = function(vm){
* 订单详情查询
* 订单详情查询
*/
*/
let
orderDetail
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
let
orderDetail
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/revision/'
+
vm
.
vuex_token
+
'/'
+
orderId
,
params
);
/**
* 结算详情查询
*/
let
querySettleByOrder
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/settle/'
+
vm
.
vuex_token
+
'/querySettleByOrder/'
+
orderId
,
params
);
/* 过程反馈查询接口 */
/* 过程反馈查询接口 */
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
let
feedbackConfig
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'/wxh-worker-rest/rest/order/v2/getFeedBack/'
+
vm
.
vuex_token
,
params
)
...
@@ -172,6 +175,7 @@ let orderApiFun = function(vm){
...
@@ -172,6 +175,7 @@ let orderApiFun = function(vm){
workerAppointment
,
workerAppointment
,
maintainWorkerCheckin
,
maintainWorkerCheckin
,
orderDetail
,
orderDetail
,
querySettleByOrder
,
listOrderRecord
,
listOrderRecord
,
orderAccept
,
orderAccept
,
orderGan
,
orderGan
,
...
...
src/components/createCom/XhFiles.vue
View file @
8b973759
...
@@ -2,10 +2,6 @@
...
@@ -2,10 +2,6 @@
<
template
>
<
template
>
<view>
<view>
<view
class=
"file-box"
>
<view
class=
"file-box"
>
<!--
<view
class=
"u-flex"
>
<view
class=
"txt u-flex-1"
>
{{
item
.
fieldsTitle
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
-->
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"pics u-flex u-flex-wrap"
>
<view
class=
"img-list"
v-for=
"(item,index) in imgList"
:key=
"index"
>
<view
class=
"img-list"
v-for=
"(item,index) in imgList"
:key=
"index"
>
<u-image
class=
"pic"
width=
"160"
height=
"160"
:src=
"item.path ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'"
:border-radius=
"10"
@
click
.
stop=
"prviewImage(item,index)"
></u-image>
<u-image
class=
"pic"
width=
"160"
height=
"160"
:src=
"item.path ? item.path : item.src + '?imageView2/1/w/100/h/100/q/75'"
:border-radius=
"10"
@
click
.
stop=
"prviewImage(item,index)"
></u-image>
...
@@ -14,13 +10,14 @@
...
@@ -14,13 +10,14 @@
<view
class=
"icon-del rotate"
></view>
<view
class=
"icon-del rotate"
></view>
</view>
</view>
</view>
</view>
<view
class=
"img-list"
>
<slot></slot>
<!--
<view
class=
"img-list"
>
<u-image
class=
"pic"
width=
"160rpx"
height=
"160rpx"
:border-radius=
"10"
@
click=
"selectUpload"
:src=
"uploadImage"
></u-image>
<u-image
class=
"pic"
width=
"160rpx"
height=
"160rpx"
:border-radius=
"10"
@
click=
"selectUpload"
:src=
"uploadImage"
></u-image>
</view>
-->
</view>
</view>
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
</view>
</view>
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
</view>
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
</view>
</view>
</
template
>
</
template
>
...
@@ -86,6 +83,26 @@
...
@@ -86,6 +83,26 @@
}
}
},
},
methods
:
{
methods
:
{
setTmpValue
(
values
)
{
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
const
dataValue
=
this
.
imgList
.
map
(
v
=>
v
.
src
)
this
.
valueChange
(
dataValue
)
},
setValue
()
{
const
dataValue
=
this
.
imgList
.
map
(
item
=>
item
.
src
)
this
.
valueChange
(
dataValue
)
},
prviewImage
(
item
,
index
)
{
uni
.
previewImage
({
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
current
:
index
});
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
this
.
setValue
()
},
/*
selectUpload(){
selectUpload(){
if (this.imgList.length === 10) {
if (this.imgList.length === 10) {
return this.$refs.uToast.show({
return this.$refs.uToast.show({
...
@@ -122,18 +139,6 @@
...
@@ -122,18 +139,6 @@
this.photograph()
this.photograph()
this.getWatermark()
this.getWatermark()
},
},
setTmpValue
(
values
)
{
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
const
dataValue
=
values
.
map
(
v
=>
v
.
key
)
this
.
valueChange
(
dataValue
)
},
setValue
()
{
const
dataValue
=
[]
this
.
imgList
.
map
(
item
=>
{
dataValue
.
push
(
item
.
src
)
})
this
.
valueChange
(
dataValue
)
},
closeTake(val) {
closeTake(val) {
if(val && val.length > 0){
if(val && val.length > 0){
// val.forEach(item=>{
// val.forEach(item=>{
...
@@ -164,16 +169,6 @@
...
@@ -164,16 +169,6 @@
// }
// }
// uploader.qnFileUpload(options)
// uploader.qnFileUpload(options)
},
},
prviewImage
(
item
,
index
)
{
uni
.
previewImage
({
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
current
:
index
});
},
delFile
(
index
)
{
this
.
imgList
.
splice
(
index
,
1
)
this
.
setValue
()
},
photograph(){// 获取拍照规范接口
photograph(){// 获取拍照规范接口
let self = this
let self = this
let param = {"partnerCompanyId":self.partnerCompanyId,
let param = {"partnerCompanyId":self.partnerCompanyId,
...
@@ -201,7 +196,7 @@
...
@@ -201,7 +196,7 @@
console.log("获取水印备注异常",res.data.message)
console.log("获取水印备注异常",res.data.message)
}
}
});
});
}
}
*/
}
}
}
}
</
script
>
</
script
>
...
...
src/components/createCom/XhSelect.vue
View file @
8b973759
<!-- ******************* 单个下拉选择 ******************* -->
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<
template
>
<view
class=
"xh-select"
:style=
"
{'width': fieldsWidth}">
<view
class=
"xh-select"
:style=
"
{'width': fieldsWidth}">
<u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
<
!--
<
u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
:custom-style=
"customStyle"
:clearable=
"false"
></u-input>
:custom-style=
"customStyle"
:clearable=
"false"
></u-input>
<u-select
:list=
"settings"
v-model=
"show"
@
confirm=
"actionSheetCallback"
safe-area-inset-bottom
></u-select>
<u-select
:list=
"settings"
v-model=
"show"
@
confirm=
"actionSheetCallback"
safe-area-inset-bottom
></u-select>
<u-icon
class=
"input-icon"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
<u-icon
class=
"input-icon"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
-->
<view
class=
"u-flex u-row-between picker-common"
>
<picker
mode=
"selector"
:value=
"index"
range-key=
"label"
:range=
"settings"
@
click=
"show = true"
@
change=
"pickerChange"
class=
"u-flex-1"
>
<view
class=
"txt"
>
{{
text
||
'请选择'
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -26,7 +33,8 @@
...
@@ -26,7 +33,8 @@
},
},
data
()
{
data
()
{
return
{
return
{
show
:
false
show
:
false
,
index
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -80,7 +88,13 @@
...
@@ -80,7 +88,13 @@
const
id
=
event
[
0
].
value
const
id
=
event
[
0
].
value
this
.
dataValue
=
id
this
.
dataValue
=
id
this
.
valueChange
(
id
)
this
.
valueChange
(
id
)
}
},
pickerChange
(
data
)
{
this
.
index
=
data
.
detail
.
value
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
this
.
dataValue
=
id
this
.
valueChange
(
id
)
},
}
}
}
}
</
script
>
</
script
>
...
@@ -95,5 +109,17 @@
...
@@ -95,5 +109,17 @@
color
:
#2272FF
;
color
:
#2272FF
;
}
}
}
}
.picker-common
{
min-height
:
35px
;
background-color
:
#F4F5F7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
}
}
</
style
>
</
style
>
src/components/createCom/XhServiceMeasure.vue
View file @
8b973759
<!-- ******************* 单级/多级 选择 ******************* -->
<!-- ******************* 单级/多级 选择 ******************* -->
<
template
>
<
template
>
<view
class=
"picker-box"
:style=
"
{'width': fieldsWidth}">
<view
class=
"picker-box"
:style=
"
{'width': fieldsWidth}">
<view
class=
"u-flex u-row-between text-view"
@
click=
"openPicker"
>
<
!--
<
view
class=
"u-flex u-row-between text-view"
@
click=
"openPicker"
>
<view
class=
"txt u-flex-1 text-title"
>
{{
text
||
''
}}
</view>
<view
class=
"txt u-flex-1 text-title"
>
{{
text
||
''
}}
</view>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"showPicker ? 'arrow-up' : 'arrow-down'"
></u-icon>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"showPicker ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
</view>
<u-picker
v-model=
"showPicker"
range-key=
"label"
@
columnchange=
"columnchange"
:mode=
"isNotMulti?'selector':'multiSelector'"
@
confirm=
"pickerConfirm"
:range=
"settings"
></u-picker>
<u-picker
v-model=
"showPicker"
range-key=
"label"
@
columnchange=
"columnchange"
:mode=
"isNotMulti?'selector':'multiSelector'"
@
confirm=
"pickerConfirm"
:range=
"settings"
></u-picker>
-->
<view
class=
"u-flex u-row-between picker-common"
>
<picker
:mode=
"isNotMulti?'selector':'multiSelector'"
:value=
"index"
range-key=
"label"
:range=
"settings"
@
click=
"showPicker = true"
@
change=
"pickerChange"
class=
"txt u-flex-1"
>
<view>
{{
text
||
'请选择'
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"showPicker ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
<!-- :default-selector='[0, 1]' -->
<!-- :default-selector='[0, 1]' -->
<u-toast
ref=
"uToast"
/>
<u-toast
ref=
"uToast"
/>
</view>
</view>
...
@@ -57,7 +63,8 @@
...
@@ -57,7 +63,8 @@
isNotMulti
:
true
,
isNotMulti
:
true
,
showPicker
:
false
,
showPicker
:
false
,
settings
:[],
settings
:[],
measure
:[]
measure
:[],
index
:
''
}
}
},
},
computed
:
{
computed
:
{
...
@@ -145,6 +152,18 @@
...
@@ -145,6 +152,18 @@
}
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
},
pickerChange
(
data
)
{
this
.
showPicker
=
false
this
.
index
=
data
.
detail
.
value
let
result
=
[]
if
(
this
.
isMulti
){
// 维修
}
else
{
// 安装
result
.
push
(
this
.
measure
[
this
.
index
])
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
columnchange
(
data
){
columnchange
(
data
){
// // 树列改变时进行联动操作
// // 树列改变时进行联动操作
// const {column ,index} = data
// const {column ,index} = data
...
@@ -155,6 +174,19 @@
...
@@ -155,6 +174,19 @@
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.picker-common
{
min-height
:
35px
;
background-color
:
#F4F5F7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
}
}
.text-view
{
.text-view
{
background-color
:
#F4F5F7
;
background-color
:
#F4F5F7
;
border-radius
:
12rpx
;
border-radius
:
12rpx
;
...
...
src/components/createCom/XhTime.vue
View file @
8b973759
<!-- ******************* 输入框 ******************* -->
<!-- ******************* 输入框 ******************* -->
<
template
>
<
template
>
<view
class=
"picker-box"
>
<view
class=
"picker-box"
>
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<!--
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<!--
<view
class=
"txt"
>
{{
item
.
fieldsTitle
}}
</view>
-->
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
-->
<!--
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
-->
<view
class=
"u-flex u-row-between"
>
<picker
mode=
"date"
:value=
"dataValue"
@
change=
"bindDateChange"
class=
"txt u-flex-1"
>
<view>
{{
dataValue
||
'请选择时间'
}}
</view>
</picker>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
</view>
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
<!--
<u-picker
v-model=
"showPicker"
:rangeKey=
"rangeKey"
@
columnchange=
"columnchange"
mode=
"multiSelector"
@
confirm=
"pickerConfirm"
:default-selector=
'[0, 1]'
:range=
"settings"
></u-picker>
-->
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
name
:
'XhInput'
,
// 新建 input
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{},
props
:
{},
...
@@ -29,19 +32,10 @@
...
@@ -29,19 +32,10 @@
minute
:
false
,
minute
:
false
,
second
:
false
,
second
:
false
,
timestamp
:
true
,
timestamp
:
true
,
}
}
},
},
computed
:
{
date
:
'请选择'
,
type
()
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
return
this
.
item
.
fieldsType
}
else
{
return
'text'
}
}
}
},
},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
openPicker
()
{
openPicker
()
{
...
@@ -53,6 +47,11 @@
...
@@ -53,6 +47,11 @@
this
.
dataValue
=
dataValue
this
.
dataValue
=
dataValue
this
.
valueChange
(
dataValue
)
this
.
valueChange
(
dataValue
)
},
},
bindDateChange
:
function
(
e
)
{
const
value
=
e
.
target
.
value
this
.
dataValue
=
value
this
.
valueChange
(
value
)
}
}
}
}
}
</
script
>
</
script
>
...
...
src/components/take/readme.md
View file @
8b973759
...
@@ -17,7 +17,7 @@ uni.hideTabBar()
...
@@ -17,7 +17,7 @@ uni.hideTabBar()
### Props
### Props
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| 属性名 | 类型 | 默认值 | 可选值 | 说明 |
| :-: | :-: | :-: | :-: | :-: |
| :-: | :-: | :-: | :-: | :-: |
| up
date
| Boolean | true | true/false | 是否默认上传 true:会自动上传好图片并返回绝对路径 false: 只返回临时路径,需要在父组件做上传动作 |
| up
load
| Boolean | true | true/false | 是否默认上传 true:会自动上传好图片并返回绝对路径 false: 只返回临时路径,需要在父组件做上传动作 |
| num | Number | 10 | 1-10 | 拍照数量,只能传1-10的正整数 |
| num | Number | 10 | 1-10 | 拍照数量,只能传1-10的正整数 |
| currentItem | Object | - | - | 对应的规范数据,用于获取示意图和水印,以及保存图片所需的ID
**格式见下文**
|
| currentItem | Object | - | - | 对应的规范数据,用于获取示意图和水印,以及保存图片所需的ID
**格式见下文**
|
...
@@ -67,10 +67,12 @@ uni.hideTabBar()
...
@@ -67,10 +67,12 @@ uni.hideTabBar()
```
javascript
```
javascript
import
takePhoto
from
'@/components/take/index.vue'
import
takePhoto
from
'@/components/take/index.vue'
import
baseFile
from
'@/components/upload/index'
// upload为false时需加上
export
default
{
export
default
{
components
:
{
components
:
{
'take-photo'
:
takePhoto
'take-photo'
:
takePhoto
},
},
mixins
:
[
baseFile
],
// upload为false时需加上
data
()
{
data
()
{
return
{
return
{
takeStatus
:
false
,
takeStatus
:
false
,
...
@@ -86,6 +88,11 @@ export default {
...
@@ -86,6 +88,11 @@ export default {
// 拍照完成或关闭相机
// 拍照完成或关闭相机
closeTake
(
images
)
{
closeTake
(
images
)
{
this
.
takeStatus
=
false
this
.
takeStatus
=
false
// upload为false时处理
const
files
=
images
.
map
(
v
=>
v
.
path
)
const
value
=
await
this
.
saveToTask
(
files
)
console
.
log
(
"value"
,
value
)
}
}
}
}
}
}
...
...
src/components/upload/index.js
View file @
8b973759
...
@@ -48,10 +48,11 @@ export default {
...
@@ -48,10 +48,11 @@ export default {
async
saveToTask
(
files
)
{
async
saveToTask
(
files
)
{
// 生成key返回,然后把key放到异步上传的任务队列
// 生成key返回,然后把key放到异步上传的任务队列
let
lists
=
files
.
map
(
v
=>
{
let
lists
=
files
.
map
(
v
=>
{
const
key
=
randomChar
(
10
)
return
{
return
{
key
:
randomChar
(
10
)
,
key
:
key
,
path
:
v
,
path
:
v
,
src
:
''
src
:
key
}
}
})
})
// for (let i = 0; i < files.length; i++) {
// for (let i = 0; i < files.length; i++) {
...
@@ -92,10 +93,11 @@ export default {
...
@@ -92,10 +93,11 @@ export default {
tempFilePath
:
path
,
tempFilePath
:
path
,
success
(
e
)
{
success
(
e
)
{
const
{
savedFilePath
}
=
e
const
{
savedFilePath
}
=
e
const
key
=
randomChar
(
10
)
const
img
=
{
const
img
=
{
key
:
randomChar
(
10
)
,
key
:
key
,
path
:
savedFilePath
,
path
:
savedFilePath
,
src
:
''
src
:
key
}
}
resolve
(
img
)
resolve
(
img
)
},
},
...
...
src/config/index.js
View file @
8b973759
...
@@ -7,7 +7,7 @@ let argo ={
...
@@ -7,7 +7,7 @@ let argo ={
1 开启调试模式,数据不入库。类型:Number。
1 开启调试模式,数据不入库。类型:Number。
2 开启调试模式,数据入库。类型:Number。
2 开启调试模式,数据入库。类型:Number。
*/
*/
debugMode
:
0
,
debugMode
:
process
.
uniEnv
.
argoDebugMode
,
autoTrack
:
true
,
autoTrack
:
true
,
uploadURL
:
'https://argo.banshouhui.com/'
uploadURL
:
'https://argo.banshouhui.com/'
}
}
...
...
src/pages/mine/wallet/index.vue
View file @
8b973759
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
},
},
handleClickCell
(
orderId
)
{
handleClickCell
(
orderId
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
url
:
'pages/order/detail'
,
url
:
'pages/order/detail
?isFromMine=1
'
,
params
:
{
params
:
{
id
:
orderId
id
:
orderId
}
}
...
...
src/pages/mine/wallet/statement.vue
View file @
8b973759
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
handleClickCell
(
orderId
)
{
handleClickCell
(
orderId
)
{
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'pages/order/detail?id='
+
orderId
url
:
'pages/order/detail?i
sFromMine=1&i
d='
+
orderId
})
})
},
},
async
loadStatement
()
{
async
loadStatement
()
{
...
...
src/pages/order/complete.vue
View file @
8b973759
This diff is collapsed.
Click to expand it.
src/pages/order/detail.vue
View file @
8b973759
...
@@ -72,6 +72,25 @@
...
@@ -72,6 +72,25 @@
</view>
</view>
<!--
</u-read-more>
-->
<!--
</u-read-more>
-->
</view>
</view>
<!-- 从我的页面进来显示计算信息 -->
<view
v-if=
"isFromMine"
class=
"settlement-view"
>
<view
class=
"settlement-title"
>
结算信息
</view>
<view
class=
"settlement-content"
>
<text
class=
"content-left"
>
工单确认时间:
</text>
<text>
{{
settlementInfo
.
formatTime
}}
</text>
</view>
<view
class=
"settlement-content"
v-for=
"(item, index) in settlementInfo.list"
:key=
"index"
>
<text
class=
"content-left"
>
{{
item
.
businessSettlementType
+
':'
}}
</text>
<text>
{{
(
item
.
realSettlementAmount
||
item
.
settlementAmount
)
+
'元'
}}
</text>
<text
v-if=
"item.adjustmentRemark"
>
{{
'-'
+
item
.
adjustmentRemark
}}
</text>
</view>
<view
class=
"settlement-content"
>
<text
class=
"content-left"
>
最终结算金额:
</text>
<text>
{{
settlementInfo
.
amount
}}
元
</text>
</view>
</view>
<!-- 其他页面进来 -->
<view
v-else
>
<view
class=
"card appoint-item"
v-show=
"showTimeSelect"
>
<view
class=
"card appoint-item"
v-show=
"showTimeSelect"
>
<appoint-time
:dateList=
"dateList"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
<appoint-time
:dateList=
"dateList"
:timeList=
"timeList"
@
dateChange=
"dateChange"
@
timeChange=
"timeChange"
@
weekChange=
"weekChange"
></appoint-time>
</view>
</view>
...
@@ -114,6 +133,9 @@
...
@@ -114,6 +133,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 不是从我的页面进来不用显示 -->
<template
v-if=
"!isFromMine"
>
<view
v-if=
"showCenterBtn"
class=
"toolbar"
>
<view
v-if=
"showCenterBtn"
class=
"toolbar"
>
<!-- 背景,内容,请求接口 根据状态不同改变
{{
operationDoing
[
order
.
orderStatus
].
background
}}
-->
<!-- 背景,内容,请求接口 根据状态不同改变
{{
operationDoing
[
order
.
orderStatus
].
background
}}
-->
<!-- 过程反馈 -->
<!-- 过程反馈 -->
...
@@ -160,6 +182,7 @@
...
@@ -160,6 +182,7 @@
</view>
</view>
<take-photo
type=
"test"
v-if=
"takeStatus"
@
close=
"closeTake"
:num=
"1"
></take-photo>
<take-photo
type=
"test"
v-if=
"takeStatus"
@
close=
"closeTake"
:num=
"1"
></take-photo>
<PopView
title=
"查看交互规范"
message=
"为完善交付质量,请查看对应的交付规范"
:visible
.
sync=
"visibale"
@
click=
"handleClick"
/>
<PopView
title=
"查看交互规范"
message=
"为完善交付质量,请查看对应的交付规范"
:visible
.
sync=
"visibale"
@
click=
"handleClick"
/>
</
template
>
</view>
</view>
</template>
</template>
...
@@ -237,7 +260,9 @@
...
@@ -237,7 +260,9 @@
showTimeOut
:
true
,
showTimeOut
:
true
,
clicking
:
false
,
clicking
:
false
,
dateItem
:
null
,
dateItem
:
null
,
centerBtnDisabled
:
false
centerBtnDisabled
:
false
,
isFromMine
:
false
,
settlementInfo
:
{
formatTime
:
'-'
,
list
:
[],
amount
:
''
}
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -246,9 +271,17 @@
...
@@ -246,9 +271,17 @@
this
.
orderId
=
option
.
id
this
.
orderId
=
option
.
id
}
}
this
.
loadOrderDetail
()
this
.
loadOrderDetail
()
this
.
loadOrderRecord
()
this
.
getLocation
()
this
.
getLocation
()
if
(
option
&&
option
.
isFromMine
)
{
this
.
isFromMine
=
true
// 获取结算信息
this
.
loadSettlement
()
}
else
{
this
.
loadOrderRecord
()
this
.
getSignDistance
()
this
.
getSignDistance
()
}
},
},
onHide
()
{
onHide
()
{
this
.
closeLocationChange
()
this
.
closeLocationChange
()
...
@@ -295,7 +328,7 @@
...
@@ -295,7 +328,7 @@
address
+=
self
.
order
.
contactAddress
||
""
address
+=
self
.
order
.
contactAddress
||
""
}
}
return
address
return
address
}
,
}
},
},
methods
:
{
methods
:
{
openLocation
(
address
){
openLocation
(
address
){
...
@@ -404,6 +437,26 @@
...
@@ -404,6 +437,26 @@
if
(
self
.
order
.
isFirstOrder
){
if
(
self
.
order
.
isFirstOrder
){
this
.
visibale
=
true
this
.
visibale
=
true
}
}
// 格式化时间
this
.
settlementInfo
.
formatTime
=
this
.
order
.
settleCenterSyncDatetime
?
this
.
$u
.
timeFormat
(
this
.
order
.
settleCenterSyncDatetime
,
'yyyy.mm.dd hh:MM:ss'
)
:
'-'
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
}
});
},
loadSettlement
()
{
// 获取工单详情
let
self
=
this
var
data
=
{
'orderId'
:
self
.
orderId
};
self
.
$u
.
api
.
querySettleByOrder
(
data
,
self
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
var
amount
=
0
for
(
var
item
of
res
.
data
)
{
amount
+=
(
item
.
realSettlementAmount
||
item
.
settlementAmount
)
}
this
.
settlementInfo
.
amount
=
amount
this
.
settlementInfo
.
list
=
res
.
data
}
else
{
}
else
{
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
console
.
log
(
res
.
message
,
"获取订单详情失败!"
);
}
}
...
@@ -1137,4 +1190,25 @@
...
@@ -1137,4 +1190,25 @@
text-align
:
left
;
text-align
:
left
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.settlement-view
{
padding
:
30rpx
;
background-color
:
#FFFFFF
;
border-radius
:
12rpx
;
.settlement-title
{
font-size
:
32rpx
;
font-weight
:
bold
;
color
:
#333333
;
margin-bottom
:
30rpx
;
}
.settlement-content
{
font-size
:
26rpx
;
color
:
#333333
;
margin-bottom
:
20rpx
;
display
:
flex
;
align-items
:
flex-start
;
.content-left
{
flex-shrink
:
0
;
}
}
}
</
style
>
</
style
>
src/pages/photo/list.vue
View file @
8b973759
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</view>
</view>
</
template
>
</
template
>
</scroll-view>
</scroll-view>
<take-photo
type=
"test"
v-if=
"takeStatus
"
:currentItem=
"currentItemDate"
@
close=
"closeTake"
></take-photo>
<take-photo
type=
"test"
v-if=
"takeStatus"
:upload=
"false
"
:currentItem=
"currentItemDate"
@
close=
"closeTake"
></take-photo>
<!-- <u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle"
<!-- <u-button v-if="activeTop + 1 === dataList.length" class="ph-list-button" type="error" shape="circle"
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button> -->
:disabled="buttonDisabled" :custom-style="buttonStyle" @click="isPopShow = true">一键清空展示图片</u-button> -->
</view>
</view>
...
@@ -57,6 +57,7 @@
...
@@ -57,6 +57,7 @@
<
script
>
<
script
>
import
takePhoto
from
'@/components/take/index.vue'
import
takePhoto
from
'@/components/take/index.vue'
import
baseFile
from
'@/components/upload/index'
;
export
default
{
export
default
{
components
:
{
components
:
{
'take-photo'
:
takePhoto
'take-photo'
:
takePhoto
...
@@ -81,6 +82,7 @@
...
@@ -81,6 +82,7 @@
title
:
'全部'
title
:
'全部'
}
}
},
},
mixins
:
[
baseFile
],
onLoad
(
e
)
{
onLoad
(
e
)
{
getApp
().
trackPage
(
'照片规范列表页'
)
getApp
().
trackPage
(
'照片规范列表页'
)
if
(
e
&&
e
.
brandId
)
{
if
(
e
&&
e
.
brandId
)
{
...
@@ -242,22 +244,27 @@
...
@@ -242,22 +244,27 @@
uni
.
hideTabBar
()
uni
.
hideTabBar
()
this
.
takeStatus
=
true
this
.
takeStatus
=
true
},
},
closeTake
(
img
)
{
async
closeTake
(
img
)
{
if
(
img
!==
undefined
){
if
(
img
!==
undefined
){
const
files
=
img
.
map
(
v
=>
v
.
path
)
const
value
=
await
this
.
saveToTask
(
files
)
if
(
!
this
.
currentItemDate
.
orderImages
)
this
.
currentItemDate
.
orderImages
=
[]
if
(
!
this
.
currentItemDate
.
orderImages
)
this
.
currentItemDate
.
orderImages
=
[]
// step1 添加图片
// 复制一份 用于保存
img
.
forEach
(
v
=>
{
let
saveList
=
this
.
currentItemDate
.
orderImages
.
concat
();
this
.
currentItemDate
.
orderImages
.
push
(
v
.
key
)
value
.
map
(
item
=>
{
// step1 添加缓存图片 到显示
this
.
currentItemDate
.
orderImages
.
push
(
item
.
path
)
// 文件key添加保存数组中
saveList
.
push
(
item
.
key
)
})
})
// step2 保存图片
// step2 保存图片
var
data
=
{
var
data
=
{
type
:
this
.
currentItemDate
.
type
,
type
:
this
.
currentItemDate
.
type
,
images
:
Array
.
from
(
this
.
currentItemDate
.
orderImages
),
images
:
Array
.
from
(
saveList
),
fieldsName
:
this
.
currentItemDate
.
fieldName
fieldsName
:
this
.
currentItemDate
.
fieldName
}
}
this
.
$u
.
api
.
saveImage
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
saveImage
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
console
.
log
(
"==="
,
res
.
data
)
}
else
{
}
else
{
console
.
log
(
"保存图片异常"
,
res
.
data
.
message
)
console
.
log
(
"保存图片异常"
,
res
.
data
.
message
)
}
}
...
...
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