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
79c94119
Commit
79c94119
authored
May 07, 2021
by
Morson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.banshouhui.com/lijundan/self-support
# Conflicts: # src/pages.json
parents
2287d568
85492f30
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
320 additions
and
69 deletions
+320
-69
complete-check.vue
src/components/complete-check/complete-check.vue
+1
-1
XhSelect.vue
src/components/createCom/XhSelect.vue
+5
-2
XhServiceMeasure.vue
src/components/createCom/XhServiceMeasure.vue
+5
-2
index.vue
src/components/order/index.vue
+11
-2
index.js
src/components/upload/index.js
+4
-4
qiniup.js
src/components/upload/qiniup.js
+2
-2
pages.json
src/pages.json
+10
-0
complete.vue
src/pages/order/complete.vue
+52
-55
material.vue
src/pages/order/material.vue
+229
-0
index.js
src/plugins/uploader/index.js
+1
-1
No files found.
src/components/complete-check/complete-check.vue
View file @
79c94119
...
@@ -116,7 +116,7 @@
...
@@ -116,7 +116,7 @@
},
},
confirm
()
{
confirm
()
{
if
(
this
.
pass
)
{
if
(
this
.
pass
)
{
this
.
$emit
(
'c
onfirm
'
)
this
.
$emit
(
'c
hange
'
)
}
else
{
}
else
{
let
data
=
this
.
listData
.
find
((
item
,
index
)
=>
{
let
data
=
this
.
listData
.
find
((
item
,
index
)
=>
{
return
item
.
pass
==
false
;
return
item
.
pass
==
false
;
...
...
src/components/createCom/XhSelect.vue
View file @
79c94119
<!-- ******************* 单个下拉选择 ******************* -->
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<
template
>
<view
class=
"xh-select"
>
<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>
...
@@ -68,7 +68,10 @@
...
@@ -68,7 +68,10 @@
'font-size'
:
'26rpx'
,
'font-size'
:
'26rpx'
,
'height'
:
'76rpx'
'height'
:
'76rpx'
}
}
}
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
...
...
src/components/createCom/XhServiceMeasure.vue
View file @
79c94119
<!-- ******************* 单级/多级 选择 ******************* -->
<!-- ******************* 单级/多级 选择 ******************* -->
<
template
>
<
template
>
<view
class=
"picker-box"
>
<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>
...
@@ -68,7 +68,10 @@
...
@@ -68,7 +68,10 @@
val
=
data
[
0
].
measureTypeName
+
"-"
+
data
[
0
].
measureName
val
=
data
[
0
].
measureTypeName
+
"-"
+
data
[
0
].
measureName
}
}
return
val
return
val
}
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
},
},
watch
:
{
watch
:
{
specificationId
(
val
,
oldVal
){
specificationId
(
val
,
oldVal
){
...
...
src/components/order/index.vue
View file @
79c94119
...
@@ -99,7 +99,16 @@
...
@@ -99,7 +99,16 @@
return
{
return
{
timeout
:
false
,
timeout
:
false
,
timestamp
:
0
,
timestamp
:
0
,
orderType
:
0
/** orderType
0 待接单、
1 待预约、
2 待签到、
3 待完工、
4 审核中、
5 异常单、
6 已完工
*/
orderType
:
0
};
};
},
},
computed
:
{
computed
:
{
...
@@ -124,7 +133,7 @@
...
@@ -124,7 +133,7 @@
return
this
.
buttonStyles
[
2
]
return
this
.
buttonStyles
[
2
]
}
}
},
},
showCountTime
()
{
showCountTime
()
{
// ((待预约、 待签到、 待完工) || (待接单 && 业务类型非抢单)) && 有超过时间点
return
([
1
,
2
,
3
].
indexOf
(
this
.
orderType
)
!=
-
1
||
(
this
.
orderType
==
0
&&
this
.
orderData
return
([
1
,
2
,
3
].
indexOf
(
this
.
orderType
)
!=
-
1
||
(
this
.
orderType
==
0
&&
this
.
orderData
.
orderBusinessType
!=
'R'
))
&&
this
.
orderData
.
currentOverTime
.
orderBusinessType
!=
'R'
))
&&
this
.
orderData
.
currentOverTime
},
},
...
...
src/components/upload/index.js
View file @
79c94119
...
@@ -58,7 +58,7 @@ export default {
...
@@ -58,7 +58,7 @@ export default {
imgList
[
res
.
fileIndex
]
imgList
[
res
.
fileIndex
]
self
.
imgList
=
imgList
self
.
imgList
=
imgList
// 多文件上传每个文件进度条
// 多文件上传每个文件进度条
console
.
log
(
res
,
'res---onProgressUpdate'
)
//
console.log(res,'res---onProgressUpdate')
},
},
onEachUpdate
(
res
){
onEachUpdate
(
res
){
// 多文件上传每个文件上传成功触发
// 多文件上传每个文件上传成功触发
...
@@ -67,7 +67,7 @@ export default {
...
@@ -67,7 +67,7 @@ export default {
imgList
[
res
.
fileIndex
].
src
=
uploader
.
qiniuTokenObj
.
visitPrefix
+
res
.
url
imgList
[
res
.
fileIndex
].
src
=
uploader
.
qiniuTokenObj
.
visitPrefix
+
res
.
url
}
}
self
.
imgList
=
imgList
self
.
imgList
=
imgList
console
.
log
(
res
,
'res---onEachUpdate'
)
//
console.log(res,'res---onEachUpdate')
},
},
cardType
:
category
,
cardType
:
category
,
...
config
...
config
...
@@ -75,8 +75,8 @@ export default {
...
@@ -75,8 +75,8 @@ export default {
// 不需要进度条等可直接获取
// 不需要进度条等可直接获取
let
res
=
await
uploader
.
qnImgUpload
(
options
)
let
res
=
await
uploader
.
qnImgUpload
(
options
)
console
.
log
(
self
.
imgList
,
'self.imgList'
)
//
console.log(self.imgList,'self.imgList')
console
.
log
(
uploader
,
uploader
.
qiniuTokenObj
,
'qiniuTokenObj'
)
//
console.log(uploader,uploader.qiniuTokenObj,'qiniuTokenObj')
// let imgList = res.map(item=>{
// let imgList = res.map(item=>{
// return {
// return {
// key:item,
// key:item,
...
...
src/components/upload/qiniup.js
View file @
79c94119
...
@@ -91,11 +91,11 @@ export default {
...
@@ -91,11 +91,11 @@ export default {
}
}
qiniuUploader
.
upload
(
params
,
(
res
)
=>
{
qiniuUploader
.
upload
(
params
,
(
res
)
=>
{
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res
111
'
)
let
inLen
=
self
.
maximum
-
fileList
.
length
let
inLen
=
self
.
maximum
-
fileList
.
length
if
(
inLen
>
0
)
{
if
(
inLen
>
0
)
{
item
.
src
=
file
item
.
src
=
file
item
.
key
=
res
.
key
||
res
.
src
item
.
key
=
res
.
url
self
.
fileMaps
.
push
(
item
);
self
.
fileMaps
.
push
(
item
);
self
.
keys
.
push
(
item
.
key
)
self
.
keys
.
push
(
item
.
key
)
if
(
submit
)
{
if
(
submit
)
{
...
...
src/pages.json
View file @
79c94119
...
@@ -172,6 +172,16 @@
...
@@ -172,6 +172,16 @@
"enablePullDownRefresh"
:
false
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#F4F5F7"
"navigationBarBackgroundColor"
:
"#F4F5F7"
}
}
},
{
"path"
:
"material"
,
"style"
:
{
"navigationBarTitleText"
:
"勘察材料"
,
"enablePullDownRefresh"
:
false
,
"navigationBarBackgroundColor"
:
"#FFFFFF"
}
}
}
]
]
},
},
...
...
src/pages/order/complete.vue
View file @
79c94119
...
@@ -397,66 +397,63 @@
...
@@ -397,66 +397,63 @@
nextStep
()
{
nextStep
()
{
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
)
{
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
)
{
this
.
tabIndex
++
this
.
tabIndex
++
this
.
arr
=
[]
this
.
arr
=
[]
this
.
scrollRightTop
=
0
this
.
leftMenuStatus
(
0
)
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
getMenuItemTop
()
this
.
getMenuItemTop
()
})
})
}
}
},
},
typeToComponentType
(
type
)
{
typeToComponentType
(
type
)
{
let
formType
=
''
// 将fieldType类型统一转换为公共组件判定类型
if
(
type
)
{
let
formType
=
''
// 将fieldType类型统一转换为公共组件判定类型
type
=
type
.
toLocaleLowerCase
()
type
=
type
.
toLocaleLowerCase
()
switch
(
type
)
{
switch
(
type
)
{
case
'text'
:
case
'text'
:
formType
=
'input'
case
'password'
:
break
case
'textarea'
:
case
'password'
:
case
'number'
:
case
'textarea'
:
case
'decimal'
:
case
'number'
:
case
'double'
:
case
'decimal'
:
case
'integer'
:
case
'double'
:
formType
=
'input'
case
'integer'
:
break
formType
=
'input'
case
'multiinput'
:
break
formType
=
'multiinput'
case
'multiinput'
:
break
;
formType
=
'multiinput'
case
'select'
:
break
;
case
'specifications'
:
case
'select'
:
formType
=
'select'
case
'specifications'
:
break
formType
=
'select'
case
'radio'
:
break
formType
=
'radio'
case
'radio'
:
break
formType
=
'radio'
case
'checkbox'
:
break
formType
=
'checkbox'
case
'checkbox'
:
break
formType
=
'checkbox'
case
'file'
:
break
case
'photos'
:
case
'file'
:
formType
=
'file'
case
'photos'
:
break
formType
=
'file'
case
'location'
:
break
formType
=
'location'
case
'location'
:
break
formType
=
'location'
case
'scan'
:
break
formType
=
'scan'
case
'scan'
:
break
formType
=
'scan'
case
'picker'
:
break
case
'mutipicker'
:
case
'picker'
:
formType
=
'picker'
case
'mutipicker'
:
break
formType
=
'picker'
case
'service_measures'
:
break
formType
=
'servicemeasure'
case
'service_measures'
:
break
formType
=
'servicemeasure'
case
'time'
:
break
case
'date'
:
case
'time'
:
formType
=
'time'
case
'date'
:
break
formType
=
'time'
}
break
}
}
return
formType
return
formType
},
},
// ------------------------- 以下方法为展示滚动切换 -------------------------
// ------------------------- 以下方法为展示滚动切换 -------------------------
...
...
src/pages/order/material.vue
0 → 100644
View file @
79c94119
<
template
>
<view
class=
"mtr-content"
>
<view
class=
"content-view"
>
<!-- 材料列表 -->
<view
class=
"mtr-tab"
>
<u-table
align=
"center"
border-color=
"#FFFFFF"
color=
"#333333"
font-size=
"rpx"
:th-style=
"thStyle"
padding=
"0"
>
<u-tr
class=
"u-tr"
>
<u-th
class=
"u-th content-tab-th"
v-for=
"(value, key) in titles"
:key=
"key"
width=
"auto"
>
<text
:class=
"['tab-th-txt',
{'left': key == firstKey}]">
{{
value
}}
</text>
</u-th>
</u-tr>
<view
class=
"line-view"
></view>
<u-tr
class=
"u-tr"
v-for=
"(item, index) in list"
:key=
"index"
>
<u-td
class=
"u-td"
v-for=
"(value, key) in titles"
:key=
"key"
>
<text
:class=
"['tab-th-txt',
{'left': key == firstKey}]">
{{
item
[
key
]
}}
</text>
</u-td>
</u-tr>
</u-table>
</view>
<!-- 其他 -->
<view
class=
"mtr-other"
>
<view
class=
"line-view"
></view>
<view
class=
"other-space"
>
<text>
其他
</text>
<image
class=
"image-view"
:src=
"addImage"
@
click=
"handleAdd"
></image>
</view>
<view
v-if=
"other.length > 0"
class=
"other-content"
>
<view
class=
"other-space"
v-for=
"(item, index) in other"
:key=
"index"
>
<view
class=
"input-view"
>
<view
class=
"other-space"
>
<text
class=
"input-title"
>
说明:
</text>
<view
class=
"input-content"
>
<u-input
v-model=
"item.title"
:clearable=
"false"
placeholder-style=
"color:#999999;font-size:26rpx"
/>
</view>
</view>
<view
class=
"other-space"
>
<text
class=
"input-title"
>
金额:
</text>
<view
class=
"input-content"
>
<u-input
v-model=
"item.value"
type=
"number"
:clearable=
"false"
placeholder-style=
"color:#999999;font-size:26rpx"
/>
</view>
</view>
</view>
<image
class=
"image-view"
:src=
"subtractImage"
@
click=
"handleSubtract"
></image>
</view>
</view>
<view
class=
"other-space"
>
<text>
超出金额
</text>
<text>
{{
money
}}
元
</text>
</view>
</view>
</view>
<!-- 底部确定按钮 -->
<view
class=
"bottom-view"
>
<u-button
class=
"sure-button"
type=
"primary"
shape=
"circle"
@
click=
"handleSure"
:custom-style=
"buttonStyle"
>
确定
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
list
:
[],
// 材料列表
other
:
[],
// 其他列表
};
},
computed
:
{
buttonStyle
()
{
return
{
width
:
"600rpx"
,
height
:
"104rpx"
,
"font-size"
:
"32rpx"
,
"font-weight"
:
"bold"
,
};
},
titles
()
{
return
{
name
:
'材料名称'
,
unit
:
'单位'
,
freeAmount
:
'免费量'
,
price
:
'单价/元'
,
consumption
:
'预计用量'
}
},
thStyle
()
{
return
{
'font-weight'
:
'bold'
}
},
firstKey
()
{
return
Object
.
keys
(
this
.
titles
)[
0
]
},
subtractImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'qxiao.png'
},
addImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'tianjia.png'
},
money
()
{
// 总额
var
amount
=
0
for
(
var
item
of
this
.
list
)
{
if
(
Number
(
item
.
consumption
)
&&
Number
(
item
.
freeAmount
)
&&
Number
(
item
.
price
))
{
amount
+=
Math
.
max
(
Number
(
item
.
consumption
)
-
Number
(
item
.
freeAmount
),
0
)
*
Number
(
item
.
price
)
}
}
for
(
var
item
of
this
.
other
)
{
if
(
item
.
value
&&
Number
(
item
.
value
))
{
amount
+=
Number
(
item
.
value
)
}
}
return
amount
}
},
created
()
{
// 测试数据
console
.
log
(
'0000'
)
for
(
var
i
=
0
;
i
<
20
;
i
++
)
{
this
.
list
.
push
({
name
:
'开关发大法师放大范德萨发大水'
,
unit
:
'个'
,
freeAmount
:
'1'
,
price
:
'45.0'
,
consumption
:
'4'
,
})
}
},
methods
:
{
/* 其他添加新的 */
handleAdd
()
{
this
.
other
.
push
({
title
:
''
,
value
:
''
})
},
/* 其他删除某个 */
handleSubtract
(
index
)
{
this
.
other
.
splice
(
index
,
1
)
},
handleSure
()
{
// 返回总额money
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.mtr-content
{
display
:
flex
;
flex-direction
:
column
;
background-color
:
#F4F5F7
;
height
:
100vh
;
.content-view
{
padding
:
30rpx
30rpx
60rpx
30rpx
;
margin
:
20rpx
30rpx
;
border-radius
:
12rpx
;
background-color
:
#FFFFFF
;
height
:
100%
;
overflow
:
auto
;
.line-view
{
background-color
:
#F4F5F7
;
height
:
2rpx
;
margin
:
20rpx
0
;
}
.mtr-tab
{
.tab-th-txt
{
background-color
:
#FFFFFF
;
padding
:
10rpx
0
;
&
.left
{
text-align
:
left
;
}
}
}
.mtr-other
{
.other-space
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.other-content
{
margin-bottom
:
30rpx
;
}
.input-view
{
padding
:
10rpx
30rpx
;
width
:
100%
;
border-radius
:
12rpx
;
border
:
1px
#F4F5F7
solid
;
margin-bottom
:
30rpx
;
.input-title
{
width
:
80rpx
;
flex-shrink
:
0
;
color
:
#333333
;
font-size
:
26rpx
;
}
.input-content
{
width
:
100%
;
}
}
.image-view
{
width
:
52rpx
;
height
:
52rpx
;
flex-shrink
:
0
;
margin
:
30rpx
0
30rpx
30rpx
;
}
}
}
.bottom-view
{
margin-bottom
:
44rpx
;
margin-top
:
10rpx
;
height
:
104rpx
;
}
}
</
style
>
src/plugins/uploader/index.js
View file @
79c94119
...
@@ -39,7 +39,7 @@ uploader.getQnToken = function(params) {
...
@@ -39,7 +39,7 @@ uploader.getQnToken = function(params) {
*region: 地区 默认为:ECN
*region: 地区 默认为:ECN
*/
*/
resolve
({
resolve
({
visitPrefix
:
data
.
host
||
globalUrl
.
qn_asset_url
,
visitPrefix
:
data
.
host
,
token
:
data
.
token
||
''
,
token
:
data
.
token
||
''
,
folderPath
:
data
.
folderPath
||
''
,
folderPath
:
data
.
folderPath
||
''
,
region
:
"ECN"
region
:
"ECN"
...
...
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