Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
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
和慭琛
take_order
Commits
ed98b6fd
Commit
ed98b6fd
authored
Dec 08, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工页面 点击 输入类
parent
c3d7da9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
253 additions
and
99 deletions
+253
-99
pages.json
take-order/pages.json
+7
-5
finish.vue
take-order/pages/take/finish.vue
+246
-94
No files found.
take-order/pages.json
View file @
ed98b6fd
...
@@ -7,19 +7,21 @@
...
@@ -7,19 +7,21 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/take/
index
"
,
"path"
:
"pages/take/
finish
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
接单
"
"navigationBarTitleText"
:
"
完工信息
"
}
}
},
},
{
{
"path"
:
"pages/take/
finish
"
,
"path"
:
"pages/take/
index
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
完工信息
"
"navigationBarTitleText"
:
"
接单
"
}
}
},
},
{
{
"path"
:
"pages/take/detail"
,
"path"
:
"pages/take/detail"
,
...
...
take-order/pages/take/finish.vue
View file @
ed98b6fd
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
item.fieldsType=='CHECKBOX' ||
item.fieldsType=='CHECKBOX' ||
item.fieldsType=='RADIO_BIG' ||
item.fieldsType=='RADIO_BIG' ||
item.fieldsType=='CHECKBOX_BIG'
item.fieldsType=='CHECKBOX_BIG'
"
@
click=
"clickTypeClick(item)"
>
"
@
click=
"clickTypeClick(item
,ikey
)"
>
<view
class=
"itemTitleView borderBottom"
>
<view
class=
"itemTitleView borderBottom"
>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemTitle bold"
>
{{
item
.
fieldsTitle
}}
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
</view>
</view>
<input
class=
"input u-m-r-30"
type=
"text"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle"
/>
<input
class=
"input u-m-r-30"
@
input=
"inputTypeInput($event,item,ikey)"
type=
"text"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle"
/>
</view>
</view>
<view
class=
"photoTypeView"
<view
class=
"photoTypeView"
v-if=
"item.fieldsType=='PHOTOS'
v-if=
"item.fieldsType=='PHOTOS'
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
</view>
</view>
<view
class=
"textAreaView"
>
<view
class=
"textAreaView"
>
<view
class=
"textAreaBoxView"
>
<view
class=
"textAreaBoxView"
>
<textarea
class=
"textArea"
v-model=
"demandContent"
value=
""
placeholder=
"请输入服务需求或故障说明,如:空调不冷、洗衣机漏水、安装晾衣架、安装洗衣机等
"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
<textarea
class=
"textArea"
v-model=
"demandContent"
value=
""
:placeholder=
"'请输入'+item.fieldsTitle
"
placeholder-style=
'color:#CCCCCC;font-size:28rpx;'
/>
</view>
</view>
</view>
</view>
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
</view>
</view>
<view
class=
"bottomView"
@
click=
"confirmClick()"
>
<view
class=
"bottomView"
@
click=
"confirmClick()"
>
<text
class=
"bottomTitle"
>
确认完工
</text>
<text
class=
"bottomTitle
whiteColor
"
>
确认完工
</text>
</view>
</view>
</view>
</view>
</template>
</template>
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
getTopInfo
(
e
)
this
.
getTopInfo
(
e
)
this
.
getConfig
()
//
this.getConfig()
this
.
getCompletionConfigInfo
()
this
.
getCompletionConfigInfo
()
},
},
methods
:
{
methods
:
{
...
@@ -147,7 +147,7 @@
...
@@ -147,7 +147,7 @@
//测试
//测试
/*
/
//
*
getApp
().
globalData
.
token
=
'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
getApp
().
globalData
.
token
=
'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this
.
orderId
=
'10704464'
this
.
orderId
=
'10704464'
this
.
inGuaranteePeriod
=
true
this
.
inGuaranteePeriod
=
true
...
@@ -156,49 +156,11 @@
...
@@ -156,49 +156,11 @@
this
.
contactAddress
=
'广东省深圳市宝安区创业一路'
this
.
contactAddress
=
'广东省深圳市宝安区创业一路'
this
.
inGuaranteePeriodText
=
'保内'
this
.
inGuaranteePeriodText
=
'保内'
this
.
orderServiceType
=
'维修'
this
.
orderServiceType
=
'维修'
*/
//
*/
},
},
getConfig
:
function
()
{
console
.
log
(
'获取 完工配置项'
)
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/config/'
+
getApp
().
globalData
.
token
+
'/completion/'
+
this
.
orderId
+
'?inGuaranteePeriod='
+
this
.
inGuaranteePeriod
,
method
:
'GET'
,
data
:
{
},
header
:{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
success
:
(
res
)
=>
{
console
.
log
(
'获取 完工配置项 成功'
)
console
.
log
(
res
)
if
(
res
.
data
.
code
==
200
){
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
console
.
log
(
'获取 完工配置项 失败'
)
console
.
log
(
e
)
}
})
},
//获取完工页详情
//获取完工页详情
getCompletionConfigInfo
:
function
()
{
getCompletionConfigInfo
:
function
()
{
...
@@ -266,27 +228,213 @@
...
@@ -266,27 +228,213 @@
},
},
clickTypeClick
:
function
(
item
)
{
//点击类 事件处理
clickTypeClick
:
function
(
item
,
ikey
)
{
console
.
log
(
'点击类 点击'
)
console
.
log
(
'点击类 点击'
)
console
.
log
(
item
.
title
)
console
.
log
(
ikey
)
console
.
log
(
item
.
type
)
console
.
log
(
item
.
fieldsTitle
)
console
.
log
(
item
.
fieldsType
)
if
(
item
.
type
==
'scan'
){
//开关类Cell
//服务措施 SERVICE_MEASURES
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
){
this
.
scanCode
(
item
)
this
.
scanCode
(
item
)
}
}
//点击类Cell
//产品规格 SPECIFICATIONS:
//产品型号 PRODUCT_NUMBER
//机器条码 MACHINE_CODE
//日期 DATE
//服务措施 SERVICE_MEASURES
//网页 WEBPAGE (海尔需求 新增 网页类型)
//单选 RADIO (后新增)
//多选 CHECKBOX (后新增)
//RADIO_BIG (后新增)
//CHECKBOX_BIG (后新增)
//产品规格 SPECIFICATIONS:
if
(
item
.
fieldsType
==
'SPECIFICATIONS'
){
}
//产品型号 PRODUCT_NUMBER
if
(
item
.
fieldsType
==
'PRODUCT_NUMBER'
){
}
//机器条码 MACHINE_CODE
if
(
item
.
fieldsType
==
'MACHINE_CODE'
){
this
.
scanCode
(
item
,
ikey
)
}
//日期 DATE
if
(
item
.
fieldsType
==
'DATE'
){
}
//服务措施 SERVICE_MEASURES
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
){
}
//网页 WEBPAGE (海尔需求 新增 网页类型)
if
(
item
.
fieldsType
==
'WEBPAGE'
){
}
//单选 RADIO (后新增)
if
(
item
.
fieldsType
==
'RADIO'
){
}
//多选 CHECKBOX (后新增)
if
(
item
.
fieldsType
==
'CHECKBOX'
){
}
//RADIO_BIG (后新增)
if
(
item
.
fieldsType
==
'RADIO_BIG'
){
}
//CHECKBOX_BIG (后新增)
if
(
item
.
fieldsType
==
'CHECKBOX_BIG'
){
}
/*
//开关类Cell
//服务措施 SERVICE_MEASURES
//点击类Cell
//产品规格 SPECIFICATIONS:
//产品型号 PRODUCT_NUMBER
//机器条码 MACHINE_CODE
//日期 DATE
//服务措施 SERVICE_MEASURES
//网页 WEBPAGE (海尔需求 新增 网页类型)
//单选 RADIO (后新增)
//多选 CHECKBOX (后新增)
//RADIO_BIG (后新增)
//CHECKBOX_BIG (后新增)
//机器条码Cell
//机器条码 MACHINE_CODE
//输入栏类Cell
//整数 INTEGER
//金额 DECIMAL
//小数(保留两位小数) DOUBLE
//字符串(单行) STRING
//文件 FILE (后新增)
//安装卡号 ICN (后新增)
//配件Cell
//PARTS
//照片Cell
//PHOTOS
//服务内容Cell
//文本(多行) TEXT
*/
},
},
scanCode
:
function
(
item
)
{
scanCode
:
function
(
item
,
ikey
)
{
let
that
=
this
uni
.
scanCode
({
uni
.
scanCode
({
scanType
:
[
'barCode'
],
success
:
function
(
res
)
{
success
:
function
(
res
)
{
console
.
log
(
'条码类型:'
+
res
.
scanType
);
console
.
log
(
'条码类型:'
+
res
.
scanType
);
console
.
log
(
'条码内容:'
+
res
.
result
);
console
.
log
(
'条码内容:'
+
res
.
result
);
that
.
updateInfo
(
ikey
,
'MACHINE_CODE'
,
res
.
result
)
}
}
});
});
},
},
//输入类 事件处理
inputTypeInput
:
function
(
e
,
item
,
ikey
)
{
console
.
log
(
'更新的选项:'
)
console
.
log
(
item
.
fieldsType
)
console
.
log
(
ikey
)
console
.
log
(
e
.
target
.
value
)
this
.
updateInfo
(
ikey
,
item
.
fieldsType
,
e
.
target
.
value
)
//输入栏类Cell
//整数 INTEGER
//金额 DECIMAL
//小数(保留两位小数) DOUBLE
//字符串(单行) STRING
//文件 FILE (后新增)
//安装卡号 ICN (后新增)
//整数 INTEGER
if
(
item
.
fieldsType
==
'INTEGER'
){
}
//金额 DECIMAL
if
(
item
.
fieldsType
==
'INTEGER'
){
}
//小数(保留两位小数) DOUBLE
if
(
item
.
fieldsType
==
'INTEGER'
){
}
//字符串(单行) STRING
if
(
item
.
fieldsType
==
'INTEGER'
){
}
//文件 FILE (后新增)
if
(
item
.
fieldsType
==
'INTEGER'
){
}
//安装卡号 ICN (后新增)
if
(
item
.
fieldsType
==
'INTEGER'
){
}
},
updateInfo
:
function
(
currentIndex
,
currentType
,
newValue
)
{
console
.
log
(
'更新的选项:'
)
console
.
log
(
currentIndex
)
console
.
log
(
currentType
)
console
.
log
(
newValue
)
for
(
var
i
=
0
;
i
<
this
.
orderInfo
.
fieldsItems
.
length
;
i
++
)
{
var
item
=
this
.
orderInfo
.
fieldsItems
[
i
]
if
(
item
.
fieldsType
==
currentType
&&
i
==
currentIndex
){
console
.
log
(
'处理前 的 选项内容:'
)
console
.
log
(
item
.
fieldsValue
)
item
.
fieldsValue
=
newValue
console
.
log
(
'处理后 的 选项内容:'
)
console
.
log
(
item
.
fieldsValue
)
}
}
},
photoClick
:
function
(
item
)
{
photoClick
:
function
(
item
)
{
console
.
log
(
item
.
image
)
console
.
log
(
item
.
image
)
//console.log(key)
//console.log(key)
...
@@ -420,6 +568,47 @@
...
@@ -420,6 +568,47 @@
})
})
},
},
/*
getConfig: function () {
console.log('获取 完工配置项')
uni.request({
url: getApp().globalData.domain_Name
+'/wxh-worker-rest/rest/config/'
+getApp().globalData.token
+'/completion/'+this.orderId
+'?inGuaranteePeriod='+this.inGuaranteePeriod,
method: 'GET',
data: {
},
header:{
'Content-Type': 'application/x-www-form-urlencoded',
},
success: (res) => {
console.log('获取 完工配置项 成功')
console.log(res)
if(res.data.code==200){
}else{
uni.showToast({
title:res.errMsg
})
}
},
fail: (e) => {
console.log('获取 完工配置项 失败')
console.log(e)
}
})
}
*/
...
@@ -463,7 +652,6 @@
...
@@ -463,7 +652,6 @@
.clickTypeView
{
.clickTypeView
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
width
:
100%
;
width
:
100%
;
height
:
88
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
...
@@ -499,7 +687,6 @@
...
@@ -499,7 +687,6 @@
.clickRightView
{
.clickRightView
{
background-color
:
#FFFFFF
;
background-color
:
#FFFFFF
;
width
:
40%
;
width
:
40%
;
height
:
88
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row-reverse
;
flex-direction
:
row-reverse
;
align-items
:
center
;
align-items
:
center
;
...
@@ -596,46 +783,17 @@
...
@@ -596,46 +783,17 @@
}
}
.padding_bottom_180
{
.padding_bottom_180
{
padding-bottom
:
180
rpx
;
padding-bottom
:
104
rpx
;
}
.nameView
{
width
:
100%
;
margin-top
:
24
rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
}
.underLine
{
text-decoration
:
underline
;
}
.bottomPadding
{
padding-bottom
:
144
rpx
;
}
.typeView
{
width
:
100%
;
height
:
80
rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
}
}
.bottomView
{
.bottomView
{
background-color
:
#
FFFF
FF
;
background-color
:
#
2272
FF
;
width
:
100%
;
width
:
100%
;
height
:
1
10
rpx
;
height
:
1
04
rpx
;
display
:
flex
;
display
:
flex
;
flex-direction
:
row
;
flex-direction
:
row
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
border-top
:
2
rpx
solid
#999999
;
position
:
fixed
;
position
:
fixed
;
bottom
:
0
;
bottom
:
0
;
}
}
...
@@ -644,15 +802,9 @@
...
@@ -644,15 +802,9 @@
font-size
:
32
rpx
;
font-size
:
32
rpx
;
}
}
.whiteColor
{
color
:
#FFFFFF
;
}
...
...
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