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
4c952cfb
Commit
4c952cfb
authored
Aug 09, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 部分:【ID1001292】 前台-师傅在小程序前台完工后,“审核中”及“已完工”状态下均可查看完工信息
parent
8e42bf84
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
551 additions
and
459 deletions
+551
-459
XhCheckbox.vue
src/components/createCom/XhCheckbox.vue
+69
-64
XhFiles.vue
src/components/createCom/XhFiles.vue
+168
-151
XhMultiInput.vue
src/components/createCom/XhMultiInput.vue
+54
-40
XhSelect.vue
src/components/createCom/XhSelect.vue
+131
-115
XhSpecifications.vue
src/components/createCom/XhSpecifications.vue
+87
-78
index.vue
src/components/order/index.vue
+5
-1
complete.vue
src/pages/order/complete.vue
+37
-10
No files found.
src/components/createCom/XhCheckbox.vue
View file @
4c952cfb
<!-- ******************* 多选框 ******************* -->
<!-- ******************* 多选框 ******************* -->
<
template
>
<
template
>
<view
class=
"list"
>
<view
class=
"list"
>
<view
v-for=
"(item,index) in settings"
:key=
"index"
<view
:class=
"
{'txt':true,'active':checkStatus(item.key)}" @click="setValue(item.key)">
{{
item
.
label
}}
v-for=
"(item, index) in settings"
</view>
:key=
"index"
</view>
:class=
"
{ txt: true, active: checkStatus(item.key) }"
@click="setValue(item.key)"
>
{{
item
.
label
}}
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
arrMixin
from
'./arrMixin'
import
arrMixin
from
'./arrMixin'
export
default
{
export
default
{
name
:
'XhRadio'
,
name
:
'XhRadio'
,
components
:
{},
components
:
{},
mixins
:
[
arrMixin
],
mixins
:
[
arrMixin
],
props
:
{},
props
:
{},
filters
:{},
filters
:
{},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{
settings
()
{
settings
()
{
return
this
.
item
.
fieldsOptions
||
[]
return
this
.
item
.
fieldsOptions
||
[]
}
},
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
checkStatus
(
item
){
checkStatus
(
item
)
{
if
(
!
item
){
if
(
!
item
)
{
return
false
return
false
}
}
const
dataValue
=
this
.
dataValue
const
dataValue
=
this
.
dataValue
let
flag
=
Array
.
isArray
(
dataValue
)
&&
dataValue
.
indexOf
(
item
)
>-
1
let
flag
=
Array
.
isArray
(
dataValue
)
&&
dataValue
.
indexOf
(
item
)
>
-
1
return
flag
return
flag
},
},
setValue
(
txt
)
{
setValue
(
txt
)
{
const
dataValue
=
this
.
dataValue
||
[]
if
(
this
.
disabled
)
return
let
idx
=
dataValue
.
indexOf
(
txt
)
const
dataValue
=
this
.
dataValue
||
[]
if
(
idx
>
-
1
)
{
let
idx
=
dataValue
.
indexOf
(
txt
)
dataValue
.
splice
(
idx
,
1
)
if
(
idx
>
-
1
)
{
}
else
{
dataValue
.
splice
(
idx
,
1
)
dataValue
.
push
(
txt
)
}
else
{
}
dataValue
.
push
(
txt
)
this
.
dataValue
=
dataValue
}
this
.
valueChange
(
this
.
dataValue
)
this
.
dataValue
=
dataValue
}
this
.
valueChange
(
this
.
dataValue
)
}
},
}
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.list
{
.list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
.txt
{
.txt
{
color
:
#333
;
color
:
#333
;
padding
:
10rpx
30rpx
;
padding
:
10rpx
30rpx
;
margin
:
10rpx
;
margin
:
10rpx
;
background
:
#F4F5F
7
;
background
:
#f4f5f
7
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
line-height
:
50rpx
;
line-height
:
50rpx
;
max-width
:
46%
;
max-width
:
46%
;
align-items
:
center
;
align-items
:
center
;
&
.active
{
&
.active
{
background-color
:
#2272FF
;
background-color
:
#2272ff
;
color
:
#fff
;
color
:
#fff
;
}
}
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhFiles.vue
View file @
4c952cfb
<!-- ******************* 文件上传 ******************* -->
<!-- ******************* 文件上传 ******************* -->
<
template
>
<
template
>
<view>
<view>
<view
class=
"file-box"
>
<view
class=
"file-box"
>
<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)"
fade
lazy-load
></u-image>
<u-image
<view
class=
"icon-del-box"
@
click
.
stop=
"delFile(index)"
>
class=
"pic"
<view
class=
"icon-del"
></view>
width=
"160"
<view
class=
"icon-del rotate"
></view>
height=
"160"
</view>
:src=
"
</view>
item.path
<slot></slot>
? item.path
<!--
<view
class=
"img-list"
>
: item.src + '?imageView2/1/w/100/h/100/q/75'
"
:border-radius=
"10"
@
click
.
stop=
"prviewImage(item, index)"
fade
lazy-load
></u-image>
<view
class=
"icon-del-box"
v-if=
"!disabled"
@
click
.
stop=
"delFile(index)"
>
<view
class=
"icon-del"
></view>
<view
class=
"icon-del rotate"
></view>
</view>
</view>
<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>
</view>
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
<!--
<u-action-sheet
:list=
"list"
v-model=
"maskShow"
:cancel-btn=
"true"
@
click=
"uploadSelect"
></u-action-sheet>
-->
</view>
</view>
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
<!--
<take-photo
v-if=
"takeStatus"
@
close=
"closeTake"
:upload=
"false"
:currentItem=
"currentItemDate"
></take-photo>
-->
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
arrMixin
from
'./arrMixin'
import
arrMixin
from
'./arrMixin'
import
baseFile
from
'@/components/upload/index'
;
import
baseFile
from
'@/components/upload/index'
import
takePhoto
from
'@/components/take/index.vue'
import
takePhoto
from
'@/components/take/index.vue'
// import uploader from '@/plugins/uploader/index.js'
// import uploader from '@/plugins/uploader/index.js'
export
default
{
export
default
{
name
:
'XhFiles'
,
name
:
'XhFiles'
,
components
:
{
components
:
{
'take-photo'
:
takePhoto
'take-photo'
:
takePhoto
,
},
},
mixins
:
[
arrMixin
,
baseFile
],
mixins
:
[
arrMixin
,
baseFile
],
props
:
{
props
:
{
files
:
{
files
:
{
type
:
Array
,
type
:
Array
,
},
},
partnerCompanyId
:
{
partnerCompanyId
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
,
},
},
categoryId
:
{
categoryId
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
,
},
},
brandId
:
{
brandId
:
{
type
:
String
,
type
:
String
,
default
:
''
default
:
''
,
},
},
},
},
filters
:{},
filters
:
{},
data
()
{
data
()
{
return
{
return
{
maskShow
:
false
,
maskShow
:
false
,
list
:
[
list
:
[
{
{
text
:
'相册'
text
:
'相册'
,
},
},
{
{
text
:
'拍照'
text
:
'拍照'
,
}
},
],
],
takeStatus
:
false
,
takeStatus
:
false
,
currentItemDate
:{},
currentItemDate
:
{},
}
}
},
},
computed
:
{
computed
:
{
settings
()
{
settings
()
{
return
this
.
item
.
settings
||
[]
return
this
.
item
.
settings
||
[]
},
},
uploadImage
()
{
uploadImage
()
{
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
return
process
.
uniEnv
.
qn_base_url
+
'upload-file.png'
},
},
},
},
mounted
()
{
mounted
()
{
if
(
this
.
value
){
if
(
this
.
value
)
{
this
.
imgList
=
this
.
value
.
filter
(
v
=>
v
).
map
(
img
=>
{
this
.
imgList
=
this
.
value
return
{
src
:
img
?
img
:
''
}
.
filter
((
v
)
=>
v
)
})
.
map
((
img
)
=>
{
this
.
setValue
()
return
{
src
:
img
?
img
:
''
}
}
})
},
this
.
setValue
()
methods
:
{
}
setTmpValue
(
values
)
{
},
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
methods
:
{
const
dataValue
=
this
.
imgList
.
map
(
v
=>
v
.
src
)
setTmpValue
(
values
)
{
this
.
valueChange
(
dataValue
)
this
.
imgList
=
this
.
imgList
.
concat
(
values
)
},
const
dataValue
=
this
.
imgList
.
map
((
v
)
=>
v
.
src
)
setValue
()
{
this
.
valueChange
(
dataValue
)
const
dataValue
=
this
.
imgList
.
map
(
item
=>
item
.
src
)
},
this
.
valueChange
(
dataValue
)
setValue
()
{
},
const
dataValue
=
this
.
imgList
.
map
((
item
)
=>
item
.
src
)
prviewImage
(
item
,
index
)
{
this
.
valueChange
(
dataValue
)
uni
.
previewImage
({
},
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
prviewImage
(
item
,
index
)
{
current
:
index
uni
.
previewImage
({
});
urls
:
[
item
.
path
?
item
.
path
:
item
.
src
],
},
current
:
index
,
delFile
(
index
)
{
})
this
.
imgList
.
splice
(
index
,
1
)
},
this
.
setValue
()
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({
...
@@ -197,66 +216,64 @@
...
@@ -197,66 +216,64 @@
}
}
});
});
}*/
}*/
}
},
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.img-list
{
position
:
relative
;
margin
:
8rpx
;
width
:
160rpx
;
height
:
160rpx
;
.pic
{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&
:nth-child
(
3n
)
{
margin-right
:
0
;
}
}
.img-list
{
.icon-del-box
{
position
:
relative
;
/* #ifndef APP-NVUE */
margin
:
8rpx
;
display
:
flex
;
width
:
160rpx
;
/* #endif */
height
:
160rpx
;
align-items
:
center
;
justify-content
:
center
;
.pic
{
position
:
absolute
;
// margin-right: 15rpx;
top
:
10rpx
;
// margin-bottom: 15rpx;
right
:
10rpx
;
&
:nth-child
(
3n
)
{
height
:
40rpx
;
margin-right
:
0
;
width
:
40rpx
;
}
border-radius
:
50%
;
}
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
.icon-del-box
{
transform
:
rotate
(
-45deg
);
/* #ifndef APP-NVUE */
}
display
:
flex
;
/* #endif */
align-items
:
center
;
justify-content
:
center
;
position
:
absolute
;
top
:
10rpx
;
right
:
10rpx
;
height
:
40rpx
;
width
:
40rpx
;
border-radius
:
50%
;
background-color
:
rgba
(
0
,
0
,
0
,
0
.5
);
z-index
:
2
;
transform
:
rotate
(
-45deg
);
}
.icon-del
{
.icon-del
{
width
:
30rpx
;
width
:
30rpx
;
height
:
4rpx
;
height
:
4rpx
;
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
2px
;
border-radius
:
2px
;
}
}
.rotate
{
.rotate
{
position
:
absolute
;
position
:
absolute
;
transform
:
rotate
(
90deg
);
transform
:
rotate
(
90deg
);
}
}
}
}
// .list {
// .list {
// display: flex;
// display: flex;
// .txt {
// .txt {
// color: #666;
// color: #666;
// padding: 10rpx;
// padding: 10rpx;
// &.active {
// &.active {
// background-color: red;
// background-color: red;
// color: #fff;
// color: #fff;
// }
// }
// }
// }
// }
// }
</
style
>
</
style
>
src/components/createCom/XhMultiInput.vue
View file @
4c952cfb
<!-- ******************* 多个输入框 ******************* -->
<!-- ******************* 多个输入框 ******************* -->
<
template
>
<
template
>
<view
class=
"u-flex u-flex-wrap"
>
<view
class=
"u-flex u-flex-wrap"
>
<u-input
class=
"input-item"
v-for=
"(item,index) in inputOptions"
v-model=
"item.value"
@
input=
"val=>
{getValue(item)}" type="text" :key="index" :border="true" :placeholder="item.placeholder" />
<u-input
</view>
class=
"input-item"
v-for=
"(item, index) in inputOptions"
v-model=
"item.value"
@
input=
"
(val) =>
{
getValue(item)
}
"
type="text"
:key="index"
:border="true"
:placeholder="item.placeholder"
:disabled="disabled"
/>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
objMixin
from
'./objMixin'
import
objMixin
from
'./objMixin'
export
default
{
export
default
{
name
:
'XhMultiInput'
,
name
:
'XhMultiInput'
,
components
:
{},
components
:
{},
mixins
:
[
objMixin
],
mixins
:
[
objMixin
],
props
:
{},
props
:
{},
data
()
{
data
()
{
return
{}
return
{}
},
},
computed
:
{
computed
:
{
inputOptions
()
{
inputOptions
()
{
let
options
=
this
.
item
.
inputOptions
||
[]
let
options
=
this
.
item
.
inputOptions
||
[]
let
result
=
options
.
map
(
item
=>
{
let
result
=
options
.
map
((
item
)
=>
{
return
{
return
{
...
item
,
...
item
,
value
:
''
value
:
''
,
}
}
})
})
return
result
return
result
}
},
},
},
watch
:
{},
watch
:
{},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
getValue
(
item
)
{
getValue
(
item
)
{
let
currentValue
=
{}
let
currentValue
=
{}
currentValue
[
item
.
fieldsName
]
=
item
.
value
currentValue
[
item
.
fieldsName
]
=
item
.
value
// 以key,value的对象形式传递
// 以key,value的对象形式传递
this
.
valueChange
(
currentValue
)
this
.
valueChange
(
currentValue
)
}
},
}
},
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
.input-item
{
.input-item
{
width
:
31%
;
width
:
31%
;
margin
:
5
rpx
;
margin
:
5
rpx
;
background
:
#F4F5F7
;
background
:
#f4f5f7
;
}
}
</
style
>
</
style
>
src/components/createCom/XhSelect.vue
View file @
4c952cfb
<!-- ******************* 单个下拉选择 ******************* -->
<!-- ******************* 单个下拉选择 ******************* -->
<
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"
>
<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"
>
<picker
<view
class=
"txt"
>
{{
text
||
'请选择'
}}
</view>
mode=
"selector"
</picker>
:value=
"index"
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
range-key=
"label"
</view>
:range=
"settings"
</view>
@
click=
"show = true"
@
change=
"pickerChange"
class=
"u-flex-1"
:disabled=
"disabled"
>
<view
class=
"txt"
>
{{
text
||
'请选择'
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
name
:
'XhSelect'
,
name
:
'XhSelect'
,
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{
props
:
{
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
:
'请选择'
default
:
'请选择'
,
},
},
width
:
{
// 例如:454rpx
width
:
{
type
:
String
,
// 例如:454rpx
default
:
'100%'
type
:
String
,
}
default
:
'100%'
,
},
},
data
()
{
},
return
{
data
()
{
show
:
false
,
return
{
index
:
''
show
:
false
,
}
index
:
''
,
},
}
computed
:
{
},
type
()
{
computed
:
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
type
()
{
return
this
.
item
.
fieldsType
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
}
else
{
return
this
.
item
.
fieldsType
return
'text'
}
else
{
}
return
'text'
},
}
settings
()
{
},
let
result
=
[]
settings
()
{
let
settings
=
this
.
item
.
fieldsOptions
||
[]
let
result
=
[]
result
=
settings
.
map
(
item
=>
{
let
settings
=
this
.
item
.
fieldsOptions
||
[]
return
{
result
=
settings
.
map
((
item
)
=>
{
label
:
item
.
label
,
return
{
value
:
item
.
key
,
label
:
item
.
label
,
color
:
'#333333'
,
value
:
item
.
key
,
fontSize
:
26
color
:
'#333333'
,
}
fontSize
:
26
,
})
}
return
result
})
},
return
result
text
(){
},
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
text
()
{
return
option
?
option
.
label
:
''
let
option
=
this
.
item
.
fieldsOptions
.
find
((
a
)
=>
{
},
return
a
.
key
===
this
.
dataValue
placeholderStyle
()
{
})
return
'color:#999999;font-size:26rpx'
return
option
?
option
.
label
:
''
},
},
customStyle
()
{
placeholderStyle
()
{
return
{
return
'color:#999999;font-size:26rpx'
'background-color'
:
'#F4F5F7'
,
},
'border-radius'
:
'12rpx'
,
customStyle
()
{
'color'
:
'#333333'
,
return
{
'padding-left'
:
'20rpx'
,
'background-color'
:
'#F4F5F7'
,
'padding-right'
:
'60rpx'
,
'border-radius'
:
'12rpx'
,
'width'
:
this
.
width
,
color
:
'#333333'
,
'font-size'
:
'26rpx'
,
'padding-left'
:
'20rpx'
,
'height'
:
'76rpx'
'padding-right'
:
'60rpx'
,
}
width
:
this
.
width
,
},
'font-size'
:
'26rpx'
,
fieldsWidth
()
{
height
:
'76rpx'
,
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
}
},
},
},
fieldsWidth
()
{
watch
:
{},
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
mounted
()
{},
},
methods
:
{
},
actionSheetCallback
(
event
)
{
watch
:
{},
const
id
=
event
[
0
].
value
mounted
()
{},
this
.
dataValue
=
id
methods
:
{
this
.
valueChange
(
id
)
actionSheetCallback
(
event
)
{
},
const
id
=
event
[
0
].
value
pickerChange
(
data
)
{
this
.
dataValue
=
id
this
.
index
=
data
.
detail
.
value
this
.
valueChange
(
id
)
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
},
this
.
dataValue
=
id
pickerChange
(
data
)
{
this
.
valueChange
(
id
)
this
.
index
=
data
.
detail
.
value
},
const
id
=
this
.
item
.
fieldsOptions
[
this
.
index
].
key
}
this
.
dataValue
=
id
}
this
.
valueChange
(
id
)
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.xh-select
{
.xh-select
{
position
:
relative
;
position
:
relative
;
.input-icon
{
.input-icon
{
position
:
absolute
;
position
:
absolute
;
right
:
20rpx
;
right
:
20rpx
;
top
:
26rpx
;
top
:
26rpx
;
color
:
#2272FF
;
color
:
#2272ff
;
}
}
}
}
.picker-common
{
.picker-common
{
min-height
:
35px
;
min-height
:
35px
;
background-color
:
#F4F5F
7
;
background-color
:
#f4f5f
7
;
border-radius
:
6px
;
border-radius
:
6px
;
color
:
#333333
;
color
:
#333333
;
padding-left
:
10px
;
padding-left
:
10px
;
padding-right
:
12px
;
padding-right
:
12px
;
width
:
100%
;
width
:
100%
;
height
:
38px
;
height
:
38px
;
.txt
{
.txt
{
font-size
:
14px
;
font-size
:
14px
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
}
}
</
style
>
</
style
>
src/components/createCom/XhSpecifications.vue
View file @
4c952cfb
<!-- ******************* 单个下拉选择 ******************* -->
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<
template
>
<view
class=
"xh-specifications"
:style=
"
{'width': fieldsWidth}">
<view
class=
"xh-specifications"
:style=
"
{ width: fieldsWidth }">
<view
class=
"u-flex u-row-between picker-common"
@
click=
"$u.throttle(handleClick, 500)"
>
<view
<view>
{{
text
||
'请选择'
}}
</view>
class=
"u-flex u-row-between picker-common"
<u-icon
class=
"input-icon"
color=
"#2272FF"
name=
"arrow-down"
></u-icon>
@
click=
"$u.throttle(handleClick, 500)"
</view>
>
</view>
<view>
{{
text
||
'请选择'
}}
</view>
<u-icon
class=
"input-icon"
color=
"#2272FF"
name=
"arrow-down"
></u-icon>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
stringMixin
from
'./stringMixin'
import
stringMixin
from
'./stringMixin'
export
default
{
export
default
{
name
:
'XhSpecifications'
,
name
:
'XhSpecifications'
,
components
:
{},
components
:
{},
mixins
:
[
stringMixin
],
mixins
:
[
stringMixin
],
props
:
{
props
:
{
placeholder
:
{
placeholder
:
{
type
:
String
,
type
:
String
,
default
:
'请选择'
default
:
'请选择'
,
},
},
width
:
{
// 例如:454rpx
width
:
{
type
:
String
,
// 例如:454rpx
default
:
'100%'
type
:
String
,
},
default
:
'100%'
,
type
:
{
},
type
:
String
,
type
:
{
default
:
'text'
type
:
String
,
},
default
:
'text'
,
},
},
data
()
{
},
return
{
data
()
{
}
return
{}
},
},
computed
:
{
computed
:
{
fieldsWidth
()
{
// 后台返回宽度就用后台的
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
// 后台返回宽度就用后台的
},
return
this
.
item
.
fieldsWidth
?
this
.
item
.
fieldsWidth
+
'rpx'
:
'100%'
text
(){
// 根据选中的key显示
},
let
option
=
this
.
item
.
fieldsOptions
.
find
(
a
=>
{
return
a
.
key
===
this
.
dataValue
})
text
()
{
return
option
?
option
.
label
:
''
// 根据选中的key显示
}
let
option
=
this
.
item
.
fieldsOptions
.
find
((
a
)
=>
{
},
return
a
.
key
===
this
.
dataValue
watch
:
{},
})
mounted
()
{},
return
option
?
option
.
label
:
''
methods
:
{
},
handleClick
()
{
},
var
pages
=
getCurrentPages
();
watch
:
{},
if
(
pages
.
length
>=
1
)
{
mounted
()
{},
var
page
=
pages
[
pages
.
length
-
1
];
methods
:
{
page
.
info
=
this
.
item
// 给下个页面传递数据
handleClick
()
{
}
if
(
this
.
disabled
)
return
uni
.
navigateTo
({
// 把选中的key传给下个页面
var
pages
=
getCurrentPages
()
url
:
'pages/order/specification?selectedId='
+
this
.
dataValue
if
(
pages
.
length
>=
1
)
{
})
var
page
=
pages
[
pages
.
length
-
1
]
}
page
.
info
=
this
.
item
// 给下个页面传递数据
}
}
}
uni
.
navigateTo
({
// 把选中的key传给下个页面
url
:
'pages/order/specification?selectedId='
+
this
.
dataValue
,
})
},
},
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.xh-specifications
{
.xh-specifications
{
position
:
relative
;
position
:
relative
;
.input-icon
{
.input-icon
{
position
:
absolute
;
position
:
absolute
;
right
:
20rpx
;
right
:
20rpx
;
top
:
26rpx
;
top
:
26rpx
;
color
:
#2272FF
;
color
:
#2272ff
;
}
}
}
}
.picker-common
{
.picker-common
{
min-height
:
35px
;
min-height
:
35px
;
background-color
:
#F4F5F
7
;
background-color
:
#f4f5f
7
;
border-radius
:
6px
;
border-radius
:
6px
;
color
:
#333333
;
color
:
#333333
;
padding-left
:
10px
;
padding-left
:
10px
;
padding-right
:
12px
;
padding-right
:
12px
;
width
:
100%
;
width
:
100%
;
height
:
38px
;
height
:
38px
;
.txt
{
.txt
{
font-size
:
14px
;
font-size
:
14px
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
}
}
</
style
>
</
style
>
src/components/order/index.vue
View file @
4c952cfb
...
@@ -356,8 +356,12 @@ export default {
...
@@ -356,8 +356,12 @@ export default {
},
},
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
// title:标题,showCountTime:是否显示倒计时。详情页面情况太多,提前传值可以避免页面晃动
handleClick
()
{
handleClick
()
{
var
func
=
'
action
'
var
func
=
'
click
'
this
.
handleExceptions
()
this
.
handleExceptions
()
// 不是待完工、审核中、异常单、已完工点按钮算点cell
if
([
3
,
4
,
5
,
6
].
indexOf
(
this
.
orderType
)
!=
-
1
)
{
func
=
'action'
}
this
.
$emit
(
this
.
$emit
(
func
,
func
,
this
.
orderData
,
this
.
orderData
,
...
...
src/pages/order/complete.vue
View file @
4c952cfb
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"item.disabled || false"
:disabled=
"
readOnly ||
item.disabled || false"
:slotContent=
"item.fieldsInfo"
:slotContent=
"item.fieldsInfo"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
...
@@ -95,6 +95,7 @@
...
@@ -95,6 +95,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-multi-input>
</xh-multi-input>
...
@@ -104,7 +105,7 @@
...
@@ -104,7 +105,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"item.disabled || false"
:disabled=
"
readOnly ||
item.disabled || false"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-radio>
</xh-radio>
...
@@ -114,6 +115,7 @@
...
@@ -114,6 +115,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-checkbox>
</xh-checkbox>
...
@@ -123,6 +125,7 @@
...
@@ -123,6 +125,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-select>
</xh-select>
...
@@ -132,6 +135,7 @@
...
@@ -132,6 +135,7 @@
:itemIndex=
"itemIndex"
:itemIndex=
"itemIndex"
:item=
"item"
:item=
"item"
:value=
"form[item.fieldsName] || ''"
:value=
"form[item.fieldsName] || ''"
:disabled=
"readOnly"
@
value-change=
"fieldValueChange"
@
value-change=
"fieldValueChange"
>
>
</xh-specifications>
</xh-specifications>
...
@@ -144,6 +148,7 @@
...
@@ -144,6 +148,7 @@
:partnerCompanyId="partnerCompanyId"
:partnerCompanyId="partnerCompanyId"
:categoryId="categoryId"
:categoryId="categoryId"
:value="form[item.fieldsName] || []"
:value="form[item.fieldsName] || []"
:disabled="readOnly"
@value-change="fieldValueChange"
@value-change="fieldValueChange"
>
>
<template
v-slot
>
<template
v-slot
>
...
@@ -499,7 +504,9 @@ export default {
...
@@ -499,7 +504,9 @@ export default {
this
.
inGuaranteePeriod
=
option
.
inGuaranteePeriod
this
.
inGuaranteePeriod
=
option
.
inGuaranteePeriod
this
.
partnerCompanyId
=
option
.
partnerCompanyId
this
.
partnerCompanyId
=
option
.
partnerCompanyId
this
.
orderStatus
=
option
.
orderStatus
this
.
orderStatus
=
option
.
orderStatus
this
.
auditResults
=
option
?.
auditResults
?
option
?.
auditResults
.
split
(
','
)
:
[]
this
.
auditResults
=
option
?.
auditResults
?
option
?.
auditResults
.
split
(
','
)
:
[]
// this.showTab =item.partnerCompanyName == '挚达充电桩'
// this.showTab =item.partnerCompanyName == '挚达充电桩'
}
else
{
}
else
{
this
.
orderId
=
11880091
this
.
orderId
=
11880091
...
@@ -513,6 +520,9 @@ export default {
...
@@ -513,6 +520,9 @@ export default {
//console.log(this.form.name, 'form.name')
//console.log(this.form.name, 'form.name')
},
},
computed
:
{
computed
:
{
readOnly
()
{
return
[
80
,
81
,
85
,
87
,
89
,
110
].
indexOf
(
Number
(
this
.
orderStatus
))
!=
-
1
},
tabList
()
{
tabList
()
{
// 没有数据的时候tab要有占位数据,不然有页面有晃动
// 没有数据的时候tab要有占位数据,不然有页面有晃动
return
this
.
list
.
length
>
0
return
this
.
list
.
length
>
0
...
@@ -577,8 +587,11 @@ export default {
...
@@ -577,8 +587,11 @@ export default {
this
.
form
=
res
.
data
.
value
||
{}
this
.
form
=
res
.
data
.
value
||
{}
this
.
initFormData
()
this
.
initFormData
()
const
list
=
res
.
data
.
config
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
const
list
=
res
.
data
.
config
.
sort
((
a
,
b
)
=>
a
.
order
-
b
.
order
)
if
(
this
.
readOnly
)
this
.
tabIndex
=
0
list
.
forEach
((
item
,
index
)
=>
{
list
.
forEach
((
item
,
index
)
=>
{
if
(
this
.
maintainStep
===
item
.
panelFieldsName
)
this
.
tabIndex
=
index
if
(
this
.
maintainStep
===
item
.
panelFieldsName
&&
!
this
.
readOnly
)
{
this
.
tabIndex
=
index
}
item
.
items
.
forEach
((
v
)
=>
{
item
.
items
.
forEach
((
v
)
=>
{
v
.
items
.
forEach
((
d
)
=>
{
v
.
items
.
forEach
((
d
)
=>
{
const
type
=
d
.
fieldsType
.
toLocaleLowerCase
()
const
type
=
d
.
fieldsType
.
toLocaleLowerCase
()
...
@@ -605,10 +618,12 @@ export default {
...
@@ -605,10 +618,12 @@ export default {
})
})
})
})
// this.showTab = this.list.length > 1
// this.showTab = this.list.length > 1
// 异常单处理
// 异常单处理
if
(
this
.
auditResults
.
length
>
0
&&
(
this
.
orderStatus
===
'88'
||
this
.
orderStatus
===
'86'
))
{
if
(
this
.
auditResults
.
length
>
0
&&
(
this
.
orderStatus
===
'88'
||
this
.
orderStatus
===
'86'
)
)
{
this
.
checkCompleteError
(
list
)
this
.
checkCompleteError
(
list
)
}
else
{
}
else
{
this
.
list
=
list
this
.
list
=
list
...
@@ -678,9 +693,9 @@ export default {
...
@@ -678,9 +693,9 @@ export default {
let
index
=
list
.
length
++
let
index
=
list
.
length
++
list
[
index
]
=
{
list
[
index
]
=
{
order
:
index
+
1
,
order
:
index
+
1
,
panelFieldsName
:
"error"
,
panelFieldsName
:
'error'
,
panelName
:
"异常处理"
,
panelName
:
'异常处理'
,
items
:
result
items
:
result
,
}
}
this
.
list
=
list
this
.
list
=
list
this
.
tabIndex
=
index
this
.
tabIndex
=
index
...
@@ -818,7 +833,12 @@ export default {
...
@@ -818,7 +833,12 @@ export default {
// 下一步动作
// 下一步动作
async
nextAction
()
{
async
nextAction
()
{
const
save
=
await
this
.
nextStepSaveData
()
const
save
=
await
this
.
nextStepSaveData
()
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
&&
save
)
{
if
(
save
)
{
this
.
nextTab
()
}
},
nextTab
()
{
if
(
this
.
tabIndex
<
this
.
list
.
length
-
1
)
{
this
.
tabIndex
++
this
.
tabIndex
++
this
.
arr
=
[]
this
.
arr
=
[]
this
.
scrollRightTop
=
0
this
.
scrollRightTop
=
0
...
@@ -831,8 +851,14 @@ export default {
...
@@ -831,8 +851,14 @@ export default {
})
})
}
}
},
},
// 下一步弹窗处理
// 下一步弹窗处理
nextStep
()
{
nextStep
()
{
console
.
log
(
'---------------------------'
,
this
.
readOnly
)
if
(
this
.
readOnly
)
{
this
.
nextTab
()
return
}
this
.
pass
=
this
.
checkCompleteItem
()
this
.
pass
=
this
.
checkCompleteItem
()
const
name
=
this
.
list
[
this
.
tabIndex
].
panelFieldsName
const
name
=
this
.
list
[
this
.
tabIndex
].
panelFieldsName
...
@@ -1037,6 +1063,7 @@ export default {
...
@@ -1037,6 +1063,7 @@ export default {
// ------------------------- 以下方法为上传组件相关 -------------------------
// ------------------------- 以下方法为上传组件相关 -------------------------
// 弹出上传选项
// 弹出上传选项
selectUpload
(
item
,
groupIndex
,
itemIndex
)
{
selectUpload
(
item
,
groupIndex
,
itemIndex
)
{
if
(
this
.
disabled
)
return
const
imgList
=
this
.
$refs
[
`fileChild
${
groupIndex
}${
itemIndex
}
`
][
0
]
const
imgList
=
this
.
$refs
[
`fileChild
${
groupIndex
}${
itemIndex
}
`
][
0
]
.
imgList
.
imgList
if
(
imgList
.
length
===
10
)
{
if
(
imgList
.
length
===
10
)
{
...
...
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