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
3adcf201
Commit
3adcf201
authored
Dec 09, 2020
by
和慭琛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工页面 接口对接
parent
2b061b66
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
718 additions
and
46 deletions
+718
-46
App.vue
take-order/App.vue
+4
-1
pages.json
take-order/pages.json
+25
-9
record.vue
take-order/pages/index/record.vue
+18
-3
wxlogin.vue
take-order/pages/login/wxlogin.vue
+3
-3
detail.vue
take-order/pages/take/detail.vue
+15
-3
finish.vue
take-order/pages/take/finish.vue
+279
-25
index.vue
take-order/pages/take/index.vue
+2
-2
measure.vue
take-order/pages/take/measure.vue
+372
-0
No files found.
take-order/App.vue
View file @
3adcf201
...
@@ -9,8 +9,9 @@
...
@@ -9,8 +9,9 @@
globalData
:
{
globalData
:
{
//https://system.banshouhui.com
//https://system.banshouhui.com
//https://system.dev.banshouhui.com
//https://system.dev.banshouhui.com
domain_Name
:
'https://system.dev.banshouhui.com'
,
//http://192.168.0.208:8192
//http://192.168.0.208:8192
domain_Name
:
'http://192.168.0.208:37080'
,
//
domain_Name: 'http://192.168.0.208:37080',
token
:
''
,
token
:
''
,
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
//RTOKEN45f41a3053238cb72b3b72fe14df8d7040c9f502
...
@@ -30,6 +31,8 @@
...
@@ -30,6 +31,8 @@
icon_rob
:
'https://qn-static.banshouhui.com/take_order/icon/rob.png'
,
icon_rob
:
'https://qn-static.banshouhui.com/take_order/icon/rob.png'
,
//右箭头 图标
//右箭头 图标
icon_arrow_right
:
'https://qn-static.banshouhui.com/arrow_right.png'
,
icon_arrow_right
:
'https://qn-static.banshouhui.com/arrow_right.png'
,
//照片添加 图标
icon_photo_add
:
'https://qn-static.banshouhui.com/take_order/icon/photo_add.png'
,
//登录注册页--
//登录注册页--
//通过code获取用户信息(登录)
//通过code获取用户信息(登录)
...
...
take-order/pages.json
View file @
3adcf201
...
@@ -7,36 +7,52 @@
...
@@ -7,36 +7,52 @@
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
{
"path"
:
"pages/take/
finish
"
,
"path"
:
"pages/take/
index
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
完工信息
"
"navigationBarTitleText"
:
"
接单
"
}
}
},
},
{
{
"path"
:
"pages/
take
/index"
,
"path"
:
"pages/
index
/index"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
接
单"
"navigationBarTitleText"
:
"
下
单"
}
}
},
},
{
{
"path"
:
"pages/take/
detail
"
,
"path"
:
"pages/take/
finish
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
接单详情
"
"navigationBarTitleText"
:
"
完工信息
"
}
}
},
},
{
{
"path"
:
"pages/
index/index
"
,
"path"
:
"pages/
take/measure
"
,
"style"
:
{
"style"
:
{
"navigationBarTitleText"
:
"
下单
"
"navigationBarTitleText"
:
"
服务措施
"
}
}
},
{
"path"
:
"pages/take/detail"
,
"style"
:
{
"navigationBarTitleText"
:
"接单详情"
}
},
},
{
{
"path"
:
"pages/take/rob"
,
"path"
:
"pages/take/rob"
,
"style"
:
{
"style"
:
{
...
...
take-order/pages/index/record.vue
View file @
3adcf201
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</view>
</view>
</view>
</view>
<view
class=
"listView"
>
<view
class=
"listView"
>
<view
class=
"itemView"
v-if=
"activeTop == 0"
v-for=
"(item,ikey) in unfinishList"
:key=
"ikey"
>
<view
class=
"itemView"
@
click=
"itemClick(item)"
v-if=
"activeTop == 0"
v-for=
"(item,ikey) in unfinishList"
:key=
"ikey"
>
<view
class=
"nameView"
>
<view
class=
"nameView"
>
<view
class=
"nameLeftView"
>
<view
class=
"nameLeftView"
>
<text
class=
"nameText"
v-if=
"item.contactName"
>
{{
item
.
contactName
}}
</text>
<text
class=
"nameText"
v-if=
"item.contactName"
>
{{
item
.
contactName
}}
</text>
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<image
class=
"noDataIcon"
:src=
"icon_noData"
mode=
""
></image>
<text
class=
"noDataText"
>
暂无数据
</text>
<text
class=
"noDataText"
>
暂无数据
</text>
</view>
</view>
<view
class=
"itemView"
v-if=
"activeTop == 1"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"itemView"
@
click=
"itemClick(item)"
v-if=
"activeTop == 1"
v-for=
"(item,ikey) in finishList"
:key=
"ikey"
>
<view
class=
"nameView"
>
<view
class=
"nameView"
>
<view
class=
"nameLeftView"
>
<view
class=
"nameLeftView"
>
<text
class=
"nameText"
v-if=
"item.contactName"
>
{{
item
.
contactName
}}
</text>
<text
class=
"nameText"
v-if=
"item.contactName"
>
{{
item
.
contactName
}}
</text>
...
@@ -91,12 +91,17 @@
...
@@ -91,12 +91,17 @@
methods
:
{
methods
:
{
//'/wxh-worker-rest/rest/order/revision/applets/'
//+this.globalData.token+'/order/customer'
//getApp().globalData.createOrderList
//获取下单列表
//获取下单列表
createOrderList
:
function
()
{
createOrderList
:
function
()
{
let
that
=
this
let
that
=
this
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
+
getApp
().
globalData
.
createOrderList
,
+
'/wxh-worker-rest/rest/order/revision/applets/'
+
getApp
().
globalData
.
token
+
'/order/customer'
,
method
:
'GET'
,
method
:
'GET'
,
data
:
{
data
:
{
type
:
this
.
activeTop
,
type
:
this
.
activeTop
,
...
@@ -137,6 +142,7 @@
...
@@ -137,6 +142,7 @@
})
})
},
},
//顶部点击
topClick
:
function
(
active
)
{
topClick
:
function
(
active
)
{
if
(
this
.
activeTop
!=
active
){
if
(
this
.
activeTop
!=
active
){
this
.
activeTop
=
active
this
.
activeTop
=
active
...
@@ -144,6 +150,7 @@
...
@@ -144,6 +150,7 @@
}
}
},
},
//拨打电话
callClick
:
function
(
phone
)
{
callClick
:
function
(
phone
)
{
console
.
log
(
phone
)
console
.
log
(
phone
)
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
...
@@ -151,6 +158,14 @@
...
@@ -151,6 +158,14 @@
});
});
},
},
//详情点击
itemClick
:
function
(
item
)
{
uni
.
navigateTo
({
url
:
'/pages/take/detail'
+
'?orderId='
+
item
.
orderId
,
})
},
}
}
...
...
take-order/pages/login/wxlogin.vue
View file @
3adcf201
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
domain_name
:
'http://192.168.0.208:8192'
,
//
domain_name:'http://192.168.0.208:8192',
isNewUser
:
false
,
isNewUser
:
false
,
unionID
:
''
,
unionID
:
''
,
openID
:
''
,
openID
:
''
,
...
@@ -128,7 +128,7 @@
...
@@ -128,7 +128,7 @@
title
:
'加载中'
title
:
'加载中'
})
})
uni
.
request
({
uni
.
request
({
url
:
this
.
domain_n
ame
url
:
getApp
().
globalData
.
domain_N
ame
+
getApp
().
globalData
.
getUsersByCode
,
+
getApp
().
globalData
.
getUsersByCode
,
method
:
'GET'
,
method
:
'GET'
,
data
:
{
data
:
{
...
@@ -227,7 +227,7 @@
...
@@ -227,7 +227,7 @@
title
:
'加载中'
title
:
'加载中'
})
})
uni
.
request
({
uni
.
request
({
url
:
this
.
domain_n
ame
url
:
getApp
().
globalData
.
domain_N
ame
+
getApp
().
globalData
.
findByMobile
,
+
getApp
().
globalData
.
findByMobile
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
...
...
take-order/pages/take/detail.vue
View file @
3adcf201
...
@@ -144,9 +144,7 @@
...
@@ -144,9 +144,7 @@
this
.
orderInfo
=
res
.
data
.
data
this
.
orderInfo
=
res
.
data
.
data
if
(
res
.
data
.
data
.
images
){
if
(
res
.
data
.
data
.
images
){
this
.
photoList
=
res
.
data
.
data
.
images
.
split
(
','
);
this
.
adjustPhotoList
(
res
.
data
.
data
.
images
)
console
.
log
(
'照片数组:'
)
console
.
log
(
this
.
photoList
)
}
}
}
else
{
}
else
{
...
@@ -166,6 +164,20 @@
...
@@ -166,6 +164,20 @@
})
})
},
},
//https://system.banshouhui.com/wxh-sts-rest/rest/file/image/order/13767/1442887919988.jpg
adjustPhotoList
:
function
(
images
)
{
var
photoArray
=
images
.
split
(
','
)
var
newPhotoArray
=
[]
photoArray
.
forEach
(
item
=>
{
var
imageURL
=
getApp
().
globalData
.
domain_Name
+
'/wxh-sts-rest'
+
item
newPhotoArray
.
push
(
imageURL
)
})
this
.
photoList
=
newPhotoArray
console
.
log
(
'照片数组:'
)
console
.
log
(
this
.
photoList
)
},
phoneCallClick
:
function
(
phone
)
{
phoneCallClick
:
function
(
phone
)
{
uni
.
makePhoneCall
({
uni
.
makePhoneCall
({
phoneNumber
:
phone
phoneNumber
:
phone
...
...
take-order/pages/take/finish.vue
View file @
3adcf201
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
<text
class=
"itemRedStar"
v-if=
"item.required"
>
*
</text>
</view>
</view>
<view
class=
"photoBackView u-p-b-30"
v-if=
"item.fieldsValue"
>
<view
class=
"photoBackView u-p-b-30"
v-if=
"item.fieldsValue"
>
<view
class=
"photoItemView"
@
click=
"photoClick(item
)"
v-for=
"(item,ikey) in item.fieldsValue
"
:key=
"ikey"
>
<view
class=
"photoItemView"
@
click=
"photoClick(item
,ikey)"
v-for=
"(item,ikey) in photoList
"
:key=
"ikey"
>
<image
class=
"photoImage"
:src=
"item.image"
mode=
"aspectFill"
></image>
<image
class=
"photoImage"
:src=
"item.image"
mode=
"aspectFill"
></image>
</view>
</view>
</view>
</view>
...
@@ -137,6 +137,7 @@
...
@@ -137,6 +137,7 @@
data
()
{
data
()
{
return
{
return
{
icon_arrow_right
:
''
,
icon_arrow_right
:
''
,
icon_photo_add
:
''
,
orderId
:
''
,
orderId
:
''
,
categoryId
:
''
,
categoryId
:
''
,
brandId
:
''
,
brandId
:
''
,
...
@@ -148,6 +149,9 @@
...
@@ -148,6 +149,9 @@
inGuaranteePeriodText
:
''
,
inGuaranteePeriodText
:
''
,
orderServiceType
:
''
,
orderServiceType
:
''
,
orderInfo
:{},
orderInfo
:{},
currentIndex
:
0
,
//产品规格 相关
is_SPECIFICATIONS_picker_show
:
false
,
is_SPECIFICATIONS_picker_show
:
false
,
result
:{
result
:{
result
:
""
result
:
""
...
@@ -158,6 +162,10 @@
...
@@ -158,6 +162,10 @@
},
},
SPECIFICATIONS_list
:[],
SPECIFICATIONS_list
:[],
current_SPECIFICATIONS_specificationId
:
''
,
current_SPECIFICATIONS_specificationId
:
''
,
SPECIFICATIONS_fieldsValue
:
''
,
SPECIFICATIONS_fieldsOptions
:
''
,
//产品型号相关
is_PRODUCT_NUMBER_picker_show
:
false
,
is_PRODUCT_NUMBER_picker_show
:
false
,
PRODUCT_NUMBER_defaultProps
:{
PRODUCT_NUMBER_defaultProps
:{
label
:
"name"
,
label
:
"name"
,
...
@@ -165,23 +173,48 @@
...
@@ -165,23 +173,48 @@
},
},
PRODUCT_NUMBER_list
:[],
PRODUCT_NUMBER_list
:[],
current_PRODUCT_NUMBER_Id
:
''
,
current_PRODUCT_NUMBER_Id
:
''
,
//日期相关
is_DATE_show
:
false
,
is_DATE_show
:
false
,
type
:
'date'
,
type
:
'date'
,
date
:
'2020/01/01'
,
date
:
'2020/01/01'
,
value
:
''
,
value
:
''
,
currentIndex
:
0
//处理措施 相关
measure_showContent
:
''
,
measure_measureTypeName
:
''
,
measure_measureTypeId
:
''
,
measure_inGuaranteeCommission
:
''
,
measure_outGuaranteeCharge
:
''
,
measure_fieldsValue
:
''
,
//照片相关
photoList
:[],
photo_fieldsValue
:
''
,
}
}
},
},
onLoad
(
e
)
{
onLoad
(
e
)
{
this
.
getTopInfo
(
e
)
this
.
getTopInfo
(
e
)
//this.getConfig()
//this.getConfig()
this
.
getCompletionConfigInfo
()
this
.
getCompletionConfigInfo
()
},
onShow
()
{
this
.
checkMeasureInfo
()
},
},
methods
:
{
methods
:
{
//获取顶部信息
getTopInfo
:
function
(
e
)
{
getTopInfo
:
function
(
e
)
{
this
.
icon_arrow_right
=
getApp
().
globalData
.
icon_arrow_right
this
.
icon_arrow_right
=
getApp
().
globalData
.
icon_arrow_right
this
.
icon_photo_add
=
getApp
().
globalData
.
icon_photo_add
if
(
e
&&
e
.
orderId
){
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
this
.
orderId
=
e
.
orderId
...
@@ -225,7 +258,7 @@
...
@@ -225,7 +258,7 @@
//测试
//测试
/
//
*
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.orderId = '10704464'
this.categoryId = '88',
this.categoryId = '88',
...
@@ -237,7 +270,7 @@
...
@@ -237,7 +270,7 @@
this.contactAddress = '广东省深圳市宝安区创业一路'
this.contactAddress = '广东省深圳市宝安区创业一路'
this.inGuaranteePeriodText = '保内'
this.inGuaranteePeriodText = '保内'
this.orderServiceType = '维修'
this.orderServiceType = '维修'
//
*/
*/
},
},
...
@@ -295,12 +328,13 @@
...
@@ -295,12 +328,13 @@
//照片
//照片
if
(
item
.
fieldsType
==
'PHOTOS'
){
if
(
item
.
fieldsType
==
'PHOTOS'
){
console
.
log
(
'处理前 的 照片数组:'
)
this
.
photoList
=
[{
image
:
'111'
},{
image
:
'222'
},{
image
:
'333'
},{
image
:
'444'
}]
console
.
log
(
item
.
fieldsValue
)
// console.log('处理前 的 照片数组:')
var
photoList
=
[{
image
:
'111'
},{
image
:
'222'
},{
image
:
'333'
},{
image
:
'444'
}]
// console.log(item.fieldsValue)
item
.
fieldsValue
=
photoList
// var photoList = [{image:'111'},{image:'222'},{image:'333'},{image:'444'}]
console
.
log
(
'处理后 的 照片数组:'
)
// item.fieldsValue = photoList
console
.
log
(
item
.
fieldsValue
)
// console.log('处理后 的 照片数组:')
// console.log(item.fieldsValue)
}
}
})
})
...
@@ -356,7 +390,7 @@
...
@@ -356,7 +390,7 @@
//服务措施 SERVICE_MEASURES
//服务措施 SERVICE_MEASURES
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
){
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
){
this
.
goToMeasure
(
item
,
ikey
)
}
}
//网页 WEBPAGE (海尔需求 新增 网页类型)
//网页 WEBPAGE (海尔需求 新增 网页类型)
...
@@ -484,9 +518,7 @@
...
@@ -484,9 +518,7 @@
this
.
current_SPECIFICATIONS_specificationId
=
res
.
value
this
.
current_SPECIFICATIONS_specificationId
=
res
.
value
this
.
updateInfo
(
''
,
'SPECIFICATIONS'
,
res
.
result
)
this
.
updateInfo
(
''
,
'SPECIFICATIONS'
,
res
.
result
)
//currentIndex,currentType,newValue
//currentIndex,currentType,newValue
/*
this
.
handleSPECIFICATIONSinfo
(
res
.
result
,
res
.
value
)
"fieldsOptions":"{\"specificationId\":10006,\"specificationName\":\"变频3P\"}","sort":2}
*/
},
},
...
@@ -496,6 +528,33 @@
...
@@ -496,6 +528,33 @@
console
.
log
(
'产品规格 取消选择'
)
console
.
log
(
'产品规格 取消选择'
)
},
},
//"fieldsOptions":"{\"specificationId\":10006,\"specificationName\":\"变频3P\"}","sort":2}
//处理产品规格 上传格式
handleSPECIFICATIONSinfo
:
function
(
specificationName
,
specificationId
){
//上传格式 说明
//第一步 字段放进字典
var
specificationDic
=
{
specificationId
:
specificationId
,
specificationName
:
specificationName
}
//第二步 字典转JSON
var
specificationJSON
=
{}
specificationJSON
[
0
]
=
specificationDic
var
specificationString
=
''
specificationString
=
JSON
.
stringify
(
specificationJSON
)
console
.
log
(
'转为JSON后的产品规格数据'
)
console
.
log
(
specificationString
)
this
.
SPECIFICATIONS_fieldsValue
=
specificationId
this
.
SPECIFICATIONS_fieldsOptions
=
specificationString
console
.
log
(
'this.SPECIFICATIONS_fieldsValue:'
+
this
.
SPECIFICATIONS_fieldsValue
)
console
.
log
(
'this.SPECIFICATIONS_fieldsOptions:'
+
this
.
SPECIFICATIONS_fieldsOptions
)
},
//http://system.banshouhui.com/wxh-sts-rest/rest/productinfo/category/88/brand/320/product
//http://system.banshouhui.com/wxh-sts-rest/rest/productinfo/category/88/brand/320/product
//http://192.168.1.22/wxh-sts-rest/rest/productinfo/category/88/brand/3897/product
//http://192.168.1.22/wxh-sts-rest/rest/productinfo/category/88/brand/3897/product
//getApp().globalData.domain_Name
//getApp().globalData.domain_Name
...
@@ -503,7 +562,7 @@
...
@@ -503,7 +562,7 @@
//获取 产品型号 数据
//获取 产品型号 数据
getPRODUCT_NUMBERinfo
:
function
()
{
getPRODUCT_NUMBERinfo
:
function
()
{
uni
.
request
({
uni
.
request
({
url
:
'http://192.168.1.22'
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-sts-rest/rest/productinfo/category/'
+
'/wxh-sts-rest/rest/productinfo/category/'
+
this
.
categoryId
+
this
.
categoryId
+
'/brand/'
+
this
.
brandId
+
'/brand/'
+
this
.
brandId
...
@@ -599,6 +658,86 @@
...
@@ -599,6 +658,86 @@
}
}
},
},
//跳转到 服务措施 页面
goToMeasure
:
function
(
item
,
ikey
)
{
if
(
this
.
current_SPECIFICATIONS_specificationId
.
length
==
0
){
uni
.
showToast
({
title
:
'请先选择产品规格'
})
return
}
//this.currentIndex = ikey
uni
.
navigateTo
({
url
:
'/pages/take/measure'
+
'?orderId='
+
this
.
orderId
+
'&serviceType='
+
this
.
orderServiceType
+
'&specificationId='
+
this
.
current_SPECIFICATIONS_specificationId
,
})
},
//检查获取 服务措施 信息
checkMeasureInfo
:
function
()
{
let
pages
=
getCurrentPages
();
let
currPage
=
pages
[
pages
.
length
-
1
];
console
.
log
(
'检查获取 服务措施 信息'
)
this
.
measure_measureTypeName
=
currPage
.
data
.
measure_measureTypeName
this
.
measure_measureTypeId
=
currPage
.
data
.
measure_measureTypeId
this
.
measure_inGuaranteeCommission
=
currPage
.
data
.
measure_inGuaranteeCommission
this
.
measure_outGuaranteeCharge
=
currPage
.
data
.
measure_outGuaranteeCharge
this
.
measure_showContent
=
currPage
.
data
.
measure_showContent
if
(
this
.
measure_measureTypeName
.
length
>
0
){
this
.
updateInfo
(
''
,
'SERVICE_MEASURES'
,
this
.
measure_showContent
)
this
.
handleMeasureInfo
()
}
},
/*
[{\"categoryId\":88,
\"categoryName\":\"家用空调\",
\"deleteFlag\":false,
\"errorCause\":\"压缩机四通阀串气\",
\"errorDesc\":\"制冷效果差\",
\"inGuaranteeCommission\":280.0,
\"measureName\":\"更换四通阀\",
\"measureTypeId\":10022,
\"measureTypeName\":\"大修2\",
\"outGuaranteeRake\":-15.0,
\"repairType\":\"维修\"}]"
*/
//处理 服务措施 上传格式
handleMeasureInfo
:
function
(){
//格式说明
//第一步:字段放进字典里
var
measureDic
=
{
MeasureName
:
this
.
measure_showContent
,
measureTypeName
:
this
.
measure_measureTypeName
,
measureTypeId
:
this
.
measure_measureTypeId
,
inGuaranteeCommission
:
this
.
measure_inGuaranteeCommission
,
measure_outGuaranteeCharge
:
this
.
measure_outGuaranteeCharge
}
//第二步:字典放进数组里
var
measureArray
=
[
measureDic
]
//第三步:数组转JSON
var
measureJSON
=
{}
measureJSON
[
0
]
=
measureArray
var
measureString
=
''
measureString
=
JSON
.
stringify
(
measureJSON
)
measureString
=
JSON
.
stringify
(
measureArray
)
console
.
log
(
'转为JSON后 的 服务措施 数据'
)
console
.
log
(
measureString
)
this
.
measure_fieldsValue
=
measureString
},
//输入类 事件处理
//输入类 事件处理
inputTypeInput
:
function
(
e
,
item
,
ikey
)
{
inputTypeInput
:
function
(
e
,
item
,
ikey
)
{
...
@@ -677,6 +816,15 @@
...
@@ -677,6 +816,15 @@
}
}
//处理措施单独判断
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
&&
currentType
==
'SERVICE_MEASURES'
){
item
.
fieldsValue
=
newValue
console
.
log
(
'处理措施单独判断'
)
break
}
if
(
item
.
fieldsType
==
currentType
if
(
item
.
fieldsType
==
currentType
&&
i
==
currentIndex
){
&&
i
==
currentIndex
){
console
.
log
(
'处理前 的 选项内容:'
)
console
.
log
(
'处理前 的 选项内容:'
)
...
@@ -694,18 +842,124 @@
...
@@ -694,18 +842,124 @@
},
},
photoClick
:
function
(
item
)
{
photoClick
:
function
(
item
,
ikey
)
{
console
.
log
(
item
.
image
)
console
.
log
(
'照片点击'
)
//console.log(
key)
console
.
log
(
i
key
)
},
},
confirmClick
:
function
()
{
confirmClick
:
function
()
{
console
.
log
(
'确认完工 点击'
)
console
.
log
(
'确认完工 点击'
)
this
.
saveInfo
()
this
.
checkAllRequired
()
},
//判断所有必填项
checkAllRequired
:
function
(){
var
isAllDone
=
true
for
(
var
i
=
0
;
i
<
this
.
orderInfo
.
fieldsItems
.
length
;
i
++
)
{
var
item
=
this
.
orderInfo
.
fieldsItems
[
i
]
if
(
item
.
required
==
true
){
if
(
!
item
.
fieldsValue
||
item
.
fieldsValue
.
length
==
0
){
isAllDone
=
false
uni
.
showToast
({
title
:
'请填写'
+
item
.
fieldsTitle
})
break
}
}
}
if
(
isAllDone
==
false
){
return
}
//处理 数据 上传格式
this
.
handleAllDataFormatStepOne
()
},
},
//处理 数据 上传格式 第一步
handleAllDataFormatStepOne
:
function
(){
console
.
log
(
'处理 数据 上传格式 第一步'
)
//特殊格式添加替换
for
(
var
i
=
0
;
i
<
this
.
orderInfo
.
fieldsItems
.
length
;
i
++
)
{
var
item
=
this
.
orderInfo
.
fieldsItems
[
i
]
//产品规格 单独处理
if
(
item
.
fieldsType
==
'SPECIFICATIONS'
){
item
.
fieldsValue
=
this
.
SPECIFICATIONS_fieldsValue
item
.
fieldsOptions
=
this
.
SPECIFICATIONS_fieldsOptions
console
.
log
(
'单独处理后的 产品规格'
)
console
.
log
(
item
.
fieldsValue
)
console
.
log
(
item
.
fieldsOptions
)
}
//产品型号 单独处理
// if (item.fieldsType == 'PRODUCT_NUMBER' ){
// item.fieldsValue = this.produ
// console.log('单独处理后的 产品型号')
// }
//处理措施 单独处理
if
(
item
.
fieldsType
==
'SERVICE_MEASURES'
){
item
.
fieldsValue
=
this
.
measure_fieldsValue
console
.
log
(
'单独处理后的 处理措施'
)
console
.
log
(
item
.
fieldsValue
)
}
}
//处理 数据 上传格式 第二步
this
.
handleAllDataFormatStepTwo
()
},
//处理 数据 上传格式 第二步
handleAllDataFormatStepTwo
:
function
(){
console
.
log
(
'处理 数据 上传格式 第二步'
)
//第一步 配置项数组 转 JSON
var
orderInfoJSON
=
{}
for
(
var
i
=
0
;
i
<
this
.
orderInfo
.
fieldsItems
.
length
;
i
++
){
orderInfoJSON
[
i
]
=
this
.
orderInfo
.
fieldsItems
[
i
]
}
var
dataString
=
''
dataString
=
JSON
.
stringify
(
orderInfoJSON
)
dataString
=
JSON
.
stringify
(
this
.
orderInfo
.
fieldsItems
)
console
.
log
(
'转为JSON后的配置项数组'
)
console
.
log
(
dataString
)
//第二步 放入key为maintainFields的字典中
var
maintainFieldsDic
=
{
maintainFields
:
dataString
}
//第三步 maintainFields的字典 转 JSON
var
maintainFieldsJSON
=
{}
maintainFieldsJSON
[
0
]
=
maintainFieldsDic
var
maintainString
=
''
maintainString
=
JSON
.
stringify
(
maintainFieldsJSON
)
//maintainString = JSON.stringify(maintainFieldsJSON)
console
.
log
(
'转为JSON后的配置项 maintainString'
)
console
.
log
(
maintainString
)
this
.
saveInfo
(
dataString
)
},
//保存完工信息
//保存完工信息
/*
/*
...
@@ -728,7 +982,7 @@
...
@@ -728,7 +982,7 @@
//第五步:字典 转 JSON
//第五步:字典 转 JSON
*/
*/
saveInfo
:
function
()
{
saveInfo
:
function
(
maintainFieldsJSON
)
{
console
.
log
(
'保存完工信息 点击'
)
console
.
log
(
'保存完工信息 点击'
)
uni
.
request
({
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
url
:
getApp
().
globalData
.
domain_Name
...
@@ -738,13 +992,13 @@
...
@@ -738,13 +992,13 @@
+
'/maintain'
,
+
'/maintain'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
{
data
:
{
maintainFields
:
''
maintainFields
:
maintainFieldsJSON
},
},
header
:{
header
:{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
'
获取完工页详情
成功'
)
console
.
log
(
'
保存完工信息
成功'
)
console
.
log
(
res
)
console
.
log
(
res
)
console
.
log
(
res
.
statusCode
)
console
.
log
(
res
.
statusCode
)
...
@@ -764,7 +1018,7 @@
...
@@ -764,7 +1018,7 @@
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
console
.
log
(
'
获取完工页详情
失败'
)
console
.
log
(
'
保存完工信息
失败'
)
console
.
log
(
e
)
console
.
log
(
e
)
uni
.
showToast
({
uni
.
showToast
({
title
:
'完工失败'
title
:
'完工失败'
...
@@ -1004,11 +1258,11 @@
...
@@ -1004,11 +1258,11 @@
}
}
.photoImage
{
.photoImage
{
background-color
:
#F
AFAFA
;
background-color
:
#F
3F3F3
;
margin-left
:
24
rpx
;
margin-left
:
24
rpx
;
margin-right
:
24
rpx
;
margin-right
:
24
rpx
;
margin-top
:
24
rpx
;
margin-top
:
24
rpx
;
height
:
2
6
0
rpx
;
height
:
2
0
0
rpx
;
}
}
.textAreaTypeView
{
.textAreaTypeView
{
...
...
take-order/pages/take/index.vue
View file @
3adcf201
...
@@ -173,11 +173,11 @@
...
@@ -173,11 +173,11 @@
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
getApp
().
globalData
.
token
=
res
.
data
getApp
().
globalData
.
token
=
res
.
data
this
.
getData
()
}
}
})
})
await
this
.
getData
()
//
await this.getData()
},
},
//获取数据
//获取数据
...
...
take-order/pages/take/measure.vue
0 → 100644
View file @
3adcf201
<
template
>
<view
class=
"backView"
>
<view
class=
"listView border_right_2"
>
<view
class=
"itemView"
@
click=
"itemClick(0,item)"
v-for=
"(item,ikey) in leftList"
:key=
"ikey"
>
<text
:class=
"current_symptomsId == item.symptomsId ? 'selectedTitle' : 'itemTitle' "
>
{{
item
.
symptomsName
}}
</text>
<image
class=
"arrowIcon"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
</view>
<view
class=
"listView border_right_2"
v-if=
"is_mid_show"
>
<view
class=
"itemView"
@
click=
"itemClick(1,item)"
v-for=
"(item,ikey) in midList"
:key=
"ikey"
>
<text
:class=
"current_causeId == item.causeId ? 'selectedTitle' : 'itemTitle' "
>
{{
item
.
symptomsName
}}
</text>
<image
class=
"arrowIcon"
:src=
"icon_arrow_right"
mode=
""
></image>
</view>
</view>
<view
class=
"listView"
v-if=
"is_right_show"
>
<view
class=
"itemView"
@
click=
"itemClick(2,item)"
v-for=
"(item,ikey) in rightList"
:key=
"ikey"
>
<text
:class=
"current_measureId == item.measureId ? 'selectedTitle' : 'itemTitle' "
>
{{
item
.
measureName
}}
</text>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
orderId
:
''
,
serviceType
:
''
,
specificationId
:
''
,
icon_arrow_right
:
''
,
current_symptomsId
:
''
,
current_causeId
:
''
,
current_measureId
:
''
,
current_measureName
:
''
,
is_mid_show
:
false
,
is_right_show
:
false
,
leftList
:[{
title
:
'左左左1'
},{
title
:
'左左左很长很长怎么办呢很长很长怎么办呢2'
},{
title
:
'左左左3'
}],
midList
:[{
title
:
'中中中1'
},{
title
:
'中中中2'
},{
title
:
'中中中很长很长怎么办呢很长很长怎么办呢3'
}],
rightList
:[{
title
:
'右右右很长很长怎么办呢很长很长怎么办呢1'
},{
title
:
'右右右2'
},{
title
:
'右右右3'
}],
}
},
onLoad
(
e
)
{
if
(
e
&&
e
.
orderId
){
this
.
orderId
=
e
.
orderId
}
if
(
e
&&
e
.
serviceType
){
this
.
serviceType
=
e
.
serviceType
}
if
(
e
&&
e
.
specificationId
){
this
.
specificationId
=
e
.
specificationId
}
this
.
icon_arrow_right
=
getApp
().
globalData
.
icon_arrow_right
},
onShow
()
{
this
.
getConfig
()
this
.
getLeftData
()
},
methods
:
{
getConfig
:
function
(){
//测试
/*
getApp().globalData.token = 'RTOKEN9336b56cffb3c2bafec54b3687f86c38bfaa364a'
this.orderId = '10704464'
this.serviceType = '维修'
this.specificationId = '10005'
*/
},
//选项点击
itemClick
:
function
(
side
,
item
)
{
console
.
log
(
'item 点击'
)
console
.
log
(
side
)
console
.
log
(
item
)
//左边 现象
if
(
side
==
0
){
this
.
current_symptomsId
=
item
.
symptomsId
this
.
getMidData
()
this
.
is_right_show
=
false
this
.
current_causeId
=
''
this
.
current_measureId
=
''
}
//中间 原因
if
(
side
==
1
){
this
.
current_causeId
=
item
.
causeId
this
.
getRightData
()
this
.
current_measureId
=
''
}
//右边 措施
if
(
side
==
2
){
this
.
current_measureId
=
item
.
measureId
this
.
current_measureName
=
item
.
measureName
this
.
getFinalData
()
}
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKENa8f4a27fef05fbcc27d473f32694e51a68101242/price/newsymptoms/V2/11885888
//左边 获取 故障现象 数据
getLeftData
:
function
()
{
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/newsymptoms/V2/'
+
this
.
orderId
,
method
:
'GET'
,
data
:
{
serviceType
:
this
.
serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 故障现象 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
this
.
leftList
=
res
.
data
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 故障现象 失败'
)
console
.
log
(
e
)
}
})
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/cause/V2/11885888/10000
//中间 获取 查询故障现象 关联的 故障原因 数据
getMidData
:
function
(){
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/cause/V2/'
+
this
.
orderId
+
'/'
+
this
.
current_symptomsId
,
method
:
'GET'
,
data
:
{
//serviceType:this.serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障现象 关联的 故障原因 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
this
.
midList
=
res
.
data
this
.
is_mid_show
=
true
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障现象 关联的 故障原因 失败'
)
console
.
log
(
e
)
}
})
},
// http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN1b8789e3a69982704a7c493a3877d55ab8f15c7d/price/measure/V2/11885888/10001
//右边 获取 查询故障原因 关联的 服务措施详情以及价格 数据
getRightData
:
function
(){
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/measure/V2/'
+
this
.
orderId
+
'/'
+
this
.
current_causeId
,
method
:
'GET'
,
data
:
{
//serviceType:this.serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障原因 关联的 服务措施详情以及价格 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
this
.
rightList
=
res
.
data
this
.
is_right_show
=
true
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'获取 查询故障原因 关联的 服务措施详情以及价格 失败'
)
console
.
log
(
e
)
}
})
},
//getToken,_specificationId,measuresId,_orderId
//http://system.banshouhui.com/wxh-worker-rest/rest/order/RTOKEN6c30a6be9e59f428455abd2fdb38fbaf360b4ae0/price/11634/charge/10001/measure/11885888
//最终请求
getFinalData
:
function
()
{
uni
.
request
({
url
:
getApp
().
globalData
.
domain_Name
+
'/wxh-worker-rest/rest/order/'
+
getApp
().
globalData
.
token
+
'/price/'
+
this
.
specificationId
+
'/charge/'
+
this
.
current_measureId
+
'/measure/'
+
this
.
orderId
,
method
:
'GET'
,
data
:
{
//serviceType:this.serviceType
},
header
:{
//'Content-Type': 'application/x-www-form-urlencoded',
},
success
:
(
res
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'最终请求 成功'
)
console
.
log
(
res
)
if
(
res
.
statusCode
==
200
){
uni
.
showToast
({
title
:
'请求成功'
})
this
.
passValueAndBack
(
res
)
}
else
{
uni
.
showToast
({
title
:
res
.
errMsg
})
}
},
fail
:
(
e
)
=>
{
uni
.
hideLoading
()
console
.
log
(
'最终请求 失败'
)
console
.
log
(
e
)
}
})
},
//传值返回
passValueAndBack
:
function
(
res
)
{
let
pages
=
getCurrentPages
();
let
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
prevPage
.
$vm
.
measure_measureTypeName
=
res
.
data
.
measureTypeName
,
prevPage
.
$vm
.
measure_measureTypeId
=
res
.
data
.
measureTypeId
,
prevPage
.
$vm
.
measure_inGuaranteeCommission
=
res
.
data
.
inGuaranteeCommission
,
prevPage
.
$vm
.
measure_outGuaranteeCharge
=
res
.
data
.
outGuaranteeCharge
,
prevPage
.
$vm
.
measure_showContent
=
this
.
current_measureName
uni
.
navigateBack
({
})
},
}
}
</
script
>
<
style
>
.backView
{
background-color
:
#FAFAFA
;
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
row
;
}
.listView
{
background-color
:
#FFFFFF
;
width
:
33%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
.border_right_2
{
border-right
:
2
rpx
solid
#F3F3F3
;
}
.itemView
{
background-color
:
#FFFFFF
;
width
:
100%
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
justify-content
:
space-between
;
border-bottom
:
2
rpx
solid
#F3F3F3
;
}
.itemTitle
{
margin-left
:
30
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
padding-top
:
30
rpx
;
padding-bottom
:
30
rpx
;
}
.selectedTitle
{
margin-left
:
30
rpx
;
font-size
:
28
rpx
;
color
:
#2272FF
;
padding-top
:
30
rpx
;
padding-bottom
:
30
rpx
;
}
.arrowIcon
{
background-color
:
#FFFFFF
;
width
:
16
rpx
;
height
:
28
rpx
;
margin-right
:
30
rpx
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment