Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
5a2a12f2
Commit
5a2a12f2
authored
Sep 22, 2022
by
刘文虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
记工时-创建工时
parent
225af844
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1103 additions
and
42 deletions
+1103
-42
bottom-buttons.vue
components/common/bottom-buttons.vue
+44
-35
bill-tabs.vue
pages/workpoint/components/bill-tabs.vue
+73
-0
billing-category.vue
pages/workpoint/components/billing-category.vue
+165
-0
workpoint-create.vue
pages/workpoint/workpoint-create/workpoint-create.vue
+786
-6
config.js
utils/config.js
+1
-1
index.js
utils/options/workpoint/index.js
+34
-0
No files found.
components/common/bottom-buttons.vue
View file @
5a2a12f2
<
template
>
<view
class=
"bottom-buttons"
>
<view
class=
"left-view"
v-if=
"showCancel"
>
<u-button
:custom-style=
"customCancel"
@
click=
"handleClickCancel"
><view
class=
"skip-view"
>
{{
cancelText
}}
</view></u-button>
<u-button
:custom-style=
"customCancel"
@
click=
"handleClickCancel"
>
{{
cancelText
}}
</u-button>
</view>
<view
class=
"right-view"
>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
:disabled=
"disabled"
:loading=
"loading"
><view
class=
"confirm-view"
>
{{
confirmText
}}
</view></u-button>
<u-button
:custom-style=
"customConFirm"
@
click=
"handleClickSure"
:disabled=
"disabled"
:loading=
"loading"
>
<view
class=
"confirm-view"
>
{{
confirmText
}}
</view>
</u-button>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:{
disabled
:{
type
:
Boolean
,
default
:
false
props
:
{
disabled
:
{
type
:
Boolean
,
default
:
false
},
loading
:{
type
:
Boolean
,
default
:
false
loading
:
{
type
:
Boolean
,
default
:
false
},
showCancel
:{
type
:
Boolean
,
default
:
true
showCancel
:
{
type
:
Boolean
,
default
:
true
},
cancelText
:{
type
:
String
,
default
:
'取消'
cancelText
:
{
type
:
String
,
default
:
'取消'
},
confirmText
:{
type
:
String
,
default
:
'保存'
confirmText
:
{
type
:
String
,
default
:
'保存'
},
customCancel
:
{
type
:
Object
,
default
:
()
=>
{
return
{
color
:
'#fc524d'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
,
width
:
'200rpx'
};
}
}
},
data
()
{
return
{
customCancel
:
{
color
:
'#02A074'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
,
width
:
'200rpx'
,
},
};
},
computed
:{
computed
:
{
customConFirm
()
{
return
{
color
:
'transparent'
,
'background-color'
:
this
.
disabled
?
'#7DCFB8'
:
'#02a074'
,
'background-color'
:
this
.
disabled
?
'#7DCFB8'
:
'#02a074'
,
height
:
'104rpx'
,
'border-radius'
:
'16rpx'
}
}
,
}
;
}
},
methods
:{
handleClickCancel
(){
this
.
$emit
(
'cancel'
)
methods
:
{
handleClickCancel
()
{
this
.
$emit
(
'cancel'
)
;
},
handleClickSure
(){
this
.
$emit
(
'confirm'
)
handleClickSure
()
{
this
.
$emit
(
'confirm'
)
;
}
}
};
...
...
@@ -73,7 +82,7 @@ export default {
.left-view
{
margin-right
:
32rpx
;
.skip-view
{
color
:
#fc524d
;
//
color: #fc524d;
height
:
104rpx
;
line-height
:
104rpx
;
font-weight
:
bold
;
...
...
pages/workpoint/components/bill-tabs.vue
0 → 100644
View file @
5a2a12f2
<
template
>
<view
class=
"bill-tabs left"
:class=
"
{ right: current === 2 }">
<view
class=
"bill-tabs-item"
:class=
"
{ 'bill-tabs-active': item.value === current }" v-for="(item, index) in list" :key="index" @click="change(item.value)">
<view
class=
"bill-tabs-item-label"
>
{{
item
.
label
}}
</view>
<view
class=
"bill-tabs-item-line"
v-if=
"item.value === current"
></view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:
{
current
:
{
type
:
Number
,
default
:
2
},
list
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
data
()
{
return
{
};
},
methods
:
{
change
(
index
)
{
this
.
$emit
(
'change'
,
index
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.bill-tabs
{
border-radius
:
16rpx
16rpx
0
0
;
height
:
72upx
;
display
:
flex
;
align-items
:
center
;
background
:
#cbede4
;
color
:
#ffffff
;
font-size
:
28rpx
;
font-weight
:
bold
;
overflow
:
hidden
;
&
-item
{
width
:
50%
;
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
position
:
relative
;
&
-line
{
position
:
absolute
;
bottom
:
10rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
40upx
;
height
:
4upx
;
background
:
$default-color
;
}
}
&
-active
{
color
:
$default-color
;
padding-bottom
:
10rpx
;
}
}
.left
{
background
:
linear-gradient
(
70deg
,
#ffffff
50%
,
#cbede4
0
);
}
.right
{
background
:
linear-gradient
(
110deg
,
#cbede4
50%
,
#ffffff
0
);
}
</
style
>
pages/workpoint/components/billing-category.vue
0 → 100644
View file @
5a2a12f2
<
template
>
<view
class=
"billing-category"
>
<uni-swiper-dot
:info=
"list"
:current=
"current"
field=
"content"
:mode=
"mode"
:dotsStyles=
"dotsStyles"
>
<swiper
class=
"swiper"
:indicator-dots=
"false"
indicator-color=
"#8d8d8d"
indicator-active-color=
"#02A074"
:autoplay=
"false"
:duration=
"duration"
@
change=
"change"
>
<swiper-item
v-for=
"(swiper, swiperIndex) in list"
:key=
"swiperIndex"
>
<view
class=
"swiper-item"
>
<view
class=
"billing-category-item"
:class=
"
{ active: item.checked }" v-for="(item, index) in swiper" :key="index" @click="handleCheck(item)">
<view
class=
"billing-category-item-icon"
:class=
"
{ 'billing-category-item-border': item.id === 'setting' }">
<u-icon
name=
"plus"
v-if=
"item.id === 'setting'"
></u-icon>
<text
v-else
>
{{
resetName
(
item
.
name
)
}}
</text>
</view>
<view
class=
"billing-category-item-text ellipsis"
:class=
"
{ 'billing-category-item-setting': item.id === 'setting' }">
<text>
{{
item
.
name
}}
</text>
</view>
</view>
</view>
</swiper-item>
</swiper>
</uni-swiper-dot>
</view>
</
template
>
<
script
>
import
UniSwiperDot
from
'@/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue'
;
import
{
billStaticBaseUrl
,
billBaseUrl
}
from
'@/utils/config.js'
;
export
default
{
name
:
'billing-category'
,
components
:
{
UniSwiperDot
},
props
:
{
list
:
{
type
:
Array
,
default
:
()
=>
[]
}
},
// watch: {
// options: {
// handler(val) {
// console.log(val);
// this.list = this.options;
// },
// deep: true,
// immediate: true
// }
// },
data
()
{
return
{
billStaticBaseUrl
,
billBaseUrl
,
duration
:
500
,
current
:
0
,
mode
:
'round'
,
dotsStyles
:
{
width
:
6
,
bottom
:
5
,
backgroundColor
:
'#8d8d8d'
,
selectedBackgroundColor
:
'#02A074'
,
border
:
'none'
,
selectedBorder
:
'none'
},
};
},
methods
:
{
checkAll
(
flag
)
{
this
.
list
.
map
((
li
,
index1
)
=>
{
li
.
map
((
el
,
index2
)
=>
{
if
(
el
.
id
!==
'setting'
)
{
el
.
checked
=
flag
;
}
});
});
this
.
change
()
},
resetName
(
name
)
{
return
name
.
slice
(
-
2
);
},
handleCheck
(
item
)
{
if
(
item
.
id
===
'setting'
)
{
this
.
$emit
(
'setting'
);
return
false
;
}
item
.
checked
=
!
item
.
checked
;
this
.
change
()
},
change
()
{
let
ids
=
[];
this
.
list
.
map
(
li
=>
{
li
.
map
(
el
=>
{
if
(
el
.
checked
)
{
ids
.
push
(
el
.
id
);
}
});
});
this
.
$emit
(
'handleClick'
,
ids
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.billing-category
{
// margin-bottom: 24upx;
width
:
100%
;
// height: 160rpx;
.swiper
{
width
:
100%
;
height
:
150rpx
;
.swiper-item
{
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-wrap
:
wrap
;
}
}
&
-item
{
height
:
110rpx
;
padding
:
0
12upx
;
width
:
16
.66%
;
// padding-bottom: 32upx;
font-size
:
28upx
;
color
:
#8d8d8d
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
&
-icon
{
width
:
72upx
;
height
:
72upx
;
background
:
#f6f7fa
;
border-radius
:
16rpx
;
text-align
:
center
;
line-height
:
72rpx
;
color
:
$default-color
;
font-size
:
26rpx
;
}
&
-text
{
width
:
100%
;
text-align
:
center
;
margin-top
:
12upx
;
font-size
:
20upx
;
line-height
:
24upx
;
color
:
#8d8d8d
;
}
&
-setting
{
color
:
$default-color
;
&
-icon
{
// margin-left: 2rpx;
}
}
&
-border
{
border
:
2rpx
solid
$default-color
;
}
}
.active
{
.billing-category-item-icon
{
background-color
:
$default-color
;
color
:
#ffffff
;
}
.billing-category-item-text
{
// color: #333333;
}
}
}
</
style
>
pages/workpoint/workpoint-create/workpoint-create.vue
View file @
5a2a12f2
This diff is collapsed.
Click to expand it.
utils/config.js
View file @
5a2a12f2
...
...
@@ -29,7 +29,7 @@ export const card_share_url = 'https://system.banshouhui.com/shareqrcode' // pag
export
const
whiteList
=
[
'/pages/index/index'
,
'/pages/index/schedule/schedule'
,
'/pages/index/bill/bill'
,
'/pages/index/mine/mine'
,
'/pages/login/login'
,
'/pages/login/quick-login/quick-login'
,
'/pages/login/binding-phone/binding-phone'
,
'/pages/login/agreement/agreement'
,
'/pages/mine/update-log/update-log'
,
'/pages/mine/about/about'
,
'/pages/maintain-bill/show'
'/pages/mine/update-log/update-log'
,
'/pages/mine/about/about'
,
'/pages/maintain-bill/show'
,
'/pages/mine/service/service'
];
// 路由白名单
export
const
responseWhiteList
=
[
'/rest/bookRecord/export'
,
'/rest/repair/export'
,
'/rest/exchangeCode/check'
,
...
...
utils/options/workpoint/index.js
0 → 100644
View file @
5a2a12f2
export
const
tabOptions
=
[{
value
:
1
,
label
:
"点工"
},
{
value
:
2
,
label
:
"包工/计量"
},
]
export
const
workTypeOptions
=
[{
value
:
"100"
,
label
:
"一个工"
},
{
value
:
"50"
,
label
:
"半个工"
},
{
value
:
"custom"
,
label
:
"自定义"
},
]
export
const
overtimeTypeOptions
=
[{
value
:
"null"
,
label
:
"无"
},
{
value
:
"custom"
,
label
:
"自定义"
},
]
\ No newline at end of file
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