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
f104a484
Commit
f104a484
authored
May 11, 2021
by
李超鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
type:update
scope: self body: 完工项 工艺、材料功能
parent
9d53f76b
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
381 additions
and
225 deletions
+381
-225
order.js
src/common/api/order.js
+8
-2
XhServiceMore.vue
src/components/createCom/XhServiceMore.vue
+81
-0
complete.vue
src/pages/order/complete.vue
+16
-2
material.vue
src/pages/order/material.vue
+276
-221
No files found.
src/common/api/order.js
View file @
f104a484
...
...
@@ -78,7 +78,7 @@ let orderApiFun = function(vm){
* 获取师傅水印 or 默认水印
*/
let
getWatermark
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
prefix
+
vm
.
vuex_token
+
'/photo/watermark'
,
params
);
/**
* 保存师傅水印
*/
...
...
@@ -115,11 +115,16 @@ let orderApiFun = function(vm){
*/
let
getMeasure
=
async
(
params
=
{})
=>
await
vm
.
$u
.
get
(
'wxh-worker-rest/rest/service/'
+
vm
.
vuex_token
+
'/measure/queryMeasureItems'
,
params
);
/**
* 查询工单材信息
*/
let
getOrderMaterial
=
async
(
orderId
)
=>
await
vm
.
$u
.
get
(
'/wxh-cloud-rest/rest/thirdparty/shzhida/material/'
+
orderId
);
/**
* 保存售后记录
*/
let
saveCompleteData
=
async
(
params
=
{},
orderId
)
=>
await
vm
.
$u
.
post
(
prefix
+
vm
.
vuex_token
+
'/order/'
+
orderId
+
'/maintain/saveMaintainInfoV2'
,
params
);
/**
* 保内工单完工
*/
...
...
@@ -161,6 +166,7 @@ let orderApiFun = function(vm){
getSignDistance
,
getCompleteConfigAndData
,
getMeasure
,
getOrderMaterial
,
saveCompleteData
,
inOrderFinish
,
outOrderFinish
,
...
...
src/components/createCom/XhServiceMore.vue
0 → 100644
View file @
f104a484
<!-- ******************* 输入框 ******************* -->
<
template
>
<view>
<view
class=
"list u-flex u-row-between"
>
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
<view
class=
"u-m-r-20"
>
{{
item
.
fieldsTitle
}}
</view>
<view
class=
"u-flex-1 location-name"
@
click=
"toMaterialPage"
>
<u-icon
name=
"map"
color=
"#2979ff"
size=
"30"
></u-icon>
请选择
</view>
</view>
<!--
<view
class=
"u-flex-1 location"
>
{{
valueTxt
||
'正在获取中...'
}}
</view>
-->
</view>
</
template
>
<
script
>
import
arrMixin
from
'./arrMixin'
export
default
{
name
:
'XhInput'
,
// 新建 input
components
:
{},
mixins
:
[
arrMixin
],
props
:
{
placeholder
:
{
type
:
String
,
default
:
'请输入'
},
orderId
:
{
type
:
String
,
default
:
'请输入'
},
},
data
()
{
return
{
maxlength
:
140
,
}
},
computed
:
{
mixingImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'mixing.png'
}
},
watch
:
{},
mounted
()
{},
methods
:
{
toMaterialPage
(){
let
self
=
this
uni
.
navigateTo
({
url
:
'pages/order/material?orderId='
+
this
.
orderId
+
'&fieldName='
+
this
.
item
.
fieldsName
,
// 接口调用成功的回调函数,即跳转到B页面 test.vue 后的回调函数
success
:
function
(
res
)
{
// 通过eventChannel向被打开页面传送数据
res
.
eventChannel
.
emit
(
'showMaterialData'
,
self
.
dataValue
);
}
})
},
}
}
</
script
>
<
style
scoped
>
.required
{
padding-right
:
10
rpx
;
font-size
:
28
rpx
;
line-height
:
40
rpx
;
color
:
#fa3534
;
}
.item-image
{
width
:
24
rpx
;
height
:
24
rpx
;
margin-right
:
10
rpx
;
}
.location-name
{
color
:
#2272FF
;
text-align
:
right
;
}
.location
{
background
:
#F4F5F7
;
padding
:
10
rpx
20
rpx
;
border-radius
:
12
rpx
;
}
</
style
>
src/pages/order/complete.vue
View file @
f104a484
...
...
@@ -24,7 +24,7 @@
<view
class=
"class-bd"
>
<u-form-item
v-for=
"(item,itemIndex) in groupItem.items"
:key=
"itemIndex"
label-position=
"top"
:prop=
"item.fieldsName"
:border-bottom=
"false"
v-show=
"item.fieldsId != 200 || show200"
>
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'">
<view
:class=
"[
{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'
&&
typeToComponentType(item.fieldsType)!=='form'
">
<image
class=
"item-image"
:src=
"mixingImage"
v-if=
"item.required"
></image>
{{
item
.
fieldsTitle
}}
</view>
...
...
@@ -73,6 +73,10 @@
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
</xh-time>
<xh-service-more
v-else-if=
"typeToComponentType(item.fieldsType)==='form'"
:groupIndex=
"groupIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:order-id=
"orderId"
:value=
'form[item.fieldsName] || ""'
@
value-change=
"fieldValueChange"
>
</xh-service-more>
</
template
>
</u-form-item>
</view>
...
...
@@ -114,6 +118,7 @@
import
XhPicker
from
'@/components/createCom/XhPicker.vue'
import
XhTime
from
'@/components/createCom/XhTime.vue'
import
XhServiceMeasure
from
'@/components/createCom/XhServiceMeasure.vue'
import
XhServiceMore
from
"../../components/createCom/XhServiceMore"
;
// import XhRadio from '@/components/createCom/XhRadio.vue'
export
default
{
data
()
{
...
...
@@ -185,7 +190,8 @@
XhScan
,
XhPicker
,
XhTime
,
XhServiceMeasure
XhServiceMeasure
,
XhServiceMore
},
created
()
{
// console.log(allComponents,'allComponents')
...
...
@@ -409,6 +415,11 @@
this
.
getMenuItemTop
()
})
},
setData
(
data
){
// 通过页面设置数据
Object
.
keys
(
data
).
forEach
(
key
=>
{
this
.
$set
(
this
.
form
,
key
,
data
[
key
])
})
},
// 字段的值更新
fieldValueChange
(
data
)
{
const
groupItem
=
this
.
list
[
this
.
tabIndex
].
items
[
data
.
groupIndex
]
...
...
@@ -496,6 +507,9 @@
case
'date'
:
formType
=
'time'
break
case
'form'
:
formType
=
'form'
break
}
return
formType
},
...
...
src/pages/order/material.vue
View file @
f104a484
This diff is collapsed.
Click to expand it.
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