Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 687c5dc9
authored
Aug 21, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat(boutique): 新增员工日报功能
- 新增员工日报相关接口和页面组件 - 集成日历组件,支持日期选择和显示
1 parent
8320c506
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
198 additions
and
101 deletions
api/module/boutique.js
pages/boutique/tool/index.vue
uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
api/module/boutique.js
View file @
687c5dc
...
@@ -9,7 +9,7 @@ import http from '../request/http'
...
@@ -9,7 +9,7 @@ import http from '../request/http'
module
.
exports
=
{
module
.
exports
=
{
/**获取APP更新 */
/**获取APP更新 */
findSoureList
(
data
)
{
findSoureList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.recepiton.soure.findSoureList'
,
method
:
'dj.api.smartcarlife.recepiton.soure.findSoureList'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -17,7 +17,7 @@ module.exports = {
...
@@ -17,7 +17,7 @@ module.exports = {
})
})
},
},
/** 查询可发放礼券-分页查询商户券列表 */
/** 查询可发放礼券-分页查询商户券列表 */
findCouponList
(
data
)
{
findCouponList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.merchantCoupon.pageForZYApp'
,
method
:
'dj.api.smartcarlife.merchantCoupon.pageForZYApp'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -28,7 +28,7 @@ module.exports = {
...
@@ -28,7 +28,7 @@ module.exports = {
})
})
},
},
/**查询用户是否领券 */
/**查询用户是否领券 */
findCustomerReceivedStatus
(
data
)
{
findCustomerReceivedStatus
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.customerCoupon.pageForZYApp'
,
method
:
'dj.api.smartcarlife.customerCoupon.pageForZYApp'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -39,7 +39,7 @@ module.exports = {
...
@@ -39,7 +39,7 @@ module.exports = {
})
})
},
},
/**历史成交客户 */
/**历史成交客户 */
historyDealOrderPage
(
data
)
{
historyDealOrderPage
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.historyDealOrder.page'
,
method
:
'dj.api.smartcarlife.order.historyDealOrder.page'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -47,7 +47,7 @@ module.exports = {
...
@@ -47,7 +47,7 @@ module.exports = {
})
})
},
},
// 历史订单列表
// 历史订单列表
getQuotationList
(
data
)
{
getQuotationList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page'
,
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -55,7 +55,7 @@ module.exports = {
...
@@ -55,7 +55,7 @@ module.exports = {
})
})
},
},
// 历史订单列表
// 历史订单列表
getOrderList
(
data
)
{
getOrderList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.for.pad.page'
,
method
:
'dj.api.smartcarlife.vehicle.damage.upgrade.for.pad.page'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -64,7 +64,7 @@ module.exports = {
...
@@ -64,7 +64,7 @@ module.exports = {
},
},
/**客户邀约记录 */
/**客户邀约记录 */
customerInviteRecordPage
(
data
)
{
customerInviteRecordPage
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.customerInviteRecord.page'
,
method
:
'dj.api.smartcarlife.customerInviteRecord.page'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -73,7 +73,7 @@ module.exports = {
...
@@ -73,7 +73,7 @@ module.exports = {
},
},
/**轻改素材配置 */
/**轻改素材配置 */
getBoutiqueMaterialConfig
(
data
)
{
getBoutiqueMaterialConfig
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.boutique.recepiton.material.merchant.detail'
,
method
:
'dj.api.boutique.recepiton.material.merchant.detail'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -82,7 +82,7 @@ module.exports = {
...
@@ -82,7 +82,7 @@ module.exports = {
},
},
/** 案例视频 */
/** 案例视频 */
getCaseList
(
data
)
{
getCaseList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.recepiton.material.case.find'
,
method
:
'dj.api.smartcarlife.recepiton.material.case.find'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -90,7 +90,7 @@ module.exports = {
...
@@ -90,7 +90,7 @@ module.exports = {
})
})
},
},
/** 获取类目 */
/** 获取类目 */
getCategory
(
data
)
{
getCategory
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.boutique.recepiton.material.merchant.category'
,
method
:
'dj.api.boutique.recepiton.material.merchant.category'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -100,7 +100,7 @@ module.exports = {
...
@@ -100,7 +100,7 @@ module.exports = {
/**
/**
* 客户邀约记录-邀约类型数目统计
* 客户邀约记录-邀约类型数目统计
*/
*/
getInviteRecordCount
(
data
)
{
getInviteRecordCount
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.customerInviteRecord.inviteStatus.count'
,
method
:
'dj.api.smartcarlife.customerInviteRecord.inviteStatus.count'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -108,7 +108,7 @@ module.exports = {
...
@@ -108,7 +108,7 @@ module.exports = {
})
})
},
},
// 案例视频中心埋点
// 案例视频中心埋点
caseVideoCenter
(
data
)
{
caseVideoCenter
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.boutique.reception.material.point.insert'
,
method
:
'dj.api.boutique.reception.material.point.insert'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -117,7 +117,7 @@ module.exports = {
...
@@ -117,7 +117,7 @@ module.exports = {
},
},
// 权益提单相关接口
// 权益提单相关接口
// 查询店铺配置
// 查询店铺配置
getShopMerchantPointConfig
(
data
)
{
getShopMerchantPointConfig
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.shopMerchantPointConfig.get'
,
method
:
'dj.api.smartcarlife.shopMerchantPointConfig.get'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -125,7 +125,7 @@ module.exports = {
...
@@ -125,7 +125,7 @@ module.exports = {
})
})
},
},
/** 根据订单状态统计订单数*/
/** 根据订单状态统计订单数*/
statByStatus
(
data
)
{
statByStatus
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.statByStatus'
,
method
:
'dj.api.smartcarlife.order.statByStatus'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -133,7 +133,7 @@ module.exports = {
...
@@ -133,7 +133,7 @@ module.exports = {
})
})
},
},
// 根据4s店商户好获取二级流浪方列表
// 根据4s店商户好获取二级流浪方列表
getSubShopMerchantList
(
data
)
{
getSubShopMerchantList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef'
,
method
:
'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -141,7 +141,7 @@ module.exports = {
...
@@ -141,7 +141,7 @@ module.exports = {
})
})
},
},
/**搜索订单(含套餐) */
/**搜索订单(含套餐) */
getWorkPackageGoodsList
(
data
)
{
getWorkPackageGoodsList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.search.containPackageGoods'
,
method
:
'dj.api.smartcarlife.order.search.containPackageGoods'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -149,7 +149,7 @@ module.exports = {
...
@@ -149,7 +149,7 @@ module.exports = {
})
})
},
},
// 获取商户订单设置
// 获取商户订单设置
getMerchantRecordingSettings
(
data
)
{
getMerchantRecordingSettings
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings'
,
method
:
'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -157,7 +157,7 @@ module.exports = {
...
@@ -157,7 +157,7 @@ module.exports = {
})
})
},
},
// 获取园区店配置
// 获取园区店配置
getYqStoreConfig
(
data
)
{
getYqStoreConfig
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smarcarlife.yqMerchantConfig.detail'
,
method
:
'dj.api.smarcarlife.yqMerchantConfig.detail'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -165,7 +165,7 @@ module.exports = {
...
@@ -165,7 +165,7 @@ module.exports = {
})
})
},
},
/**补录订单数 */
/**补录订单数 */
waitinputorder
(
data
)
{
waitinputorder
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.weapp.waitinputorder.count'
,
method
:
'dj.api.smartcarlife.weapp.waitinputorder.count'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -173,7 +173,7 @@ module.exports = {
...
@@ -173,7 +173,7 @@ module.exports = {
})
})
},
},
/**交易流水号 */
/**交易流水号 */
transactionSerialNumber
(
data
)
{
transactionSerialNumber
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.weapp.waitinputorder.page'
,
method
:
'dj.api.smartcarlife.weapp.waitinputorder.page'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -181,7 +181,7 @@ module.exports = {
...
@@ -181,7 +181,7 @@ module.exports = {
})
})
},
},
// 根据商户号获取可选商品列表
// 根据商户号获取可选商品列表
getSelectOrderGoodsList
(
data
)
{
getSelectOrderGoodsList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.selectOrderGoods.list'
,
method
:
'dj.api.smartcarlife.selectOrderGoods.list'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -189,7 +189,7 @@ module.exports = {
...
@@ -189,7 +189,7 @@ module.exports = {
})
})
},
},
/** 选择支付方式下单 */
/** 选择支付方式下单 */
createWithPay
(
data
)
{
createWithPay
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.createWithPay'
,
method
:
'dj.api.smartcarlife.order.createWithPay'
,
...
@@ -198,7 +198,7 @@ module.exports = {
...
@@ -198,7 +198,7 @@ module.exports = {
})
})
},
},
/** 订单补录 */
/** 订单补录 */
supplementOrder
(
data
)
{
supplementOrder
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.supplementOrder'
,
method
:
'dj.api.smartcarlife.order.supplementOrder'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -206,7 +206,7 @@ module.exports = {
...
@@ -206,7 +206,7 @@ module.exports = {
})
})
},
},
// 获取精品升级场景 太阳膜类商品部位数据
// 获取精品升级场景 太阳膜类商品部位数据
getPositionList
(
data
)
{
getPositionList
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.goodsPosition.list'
,
method
:
'dj.api.smartcarlife.goodsPosition.list'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -214,22 +214,22 @@ module.exports = {
...
@@ -214,22 +214,22 @@ module.exports = {
})
})
},
},
/** 查询该店员工日报是否开启 */
/** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid
(
data
)
{
staffDailyReportMerchantValid
(
data
)
{
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return
http
.
post
({
method
:
'dj.api.smartcarlife.staff.daily.report.popup.need'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.staff.daily.report.popup.need'
,
projectName
:
'boutique'
,
...
data
})
},
},
/** 校验手机号是否配置打卡和是否打卡 */
/** 校验手机号是否配置打卡和是否打卡 */
clockInConfigPhone
(
data
)
{
clockInConfigPhone
(
data
)
{
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return
http
.
post
({
method
:
'dj.api.smartcarlife.clock.in.config.phone'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.clock.in.config.phone'
,
projectName
:
'boutique'
,
...
data
})
},
},
/** 获取商户基本信息 */
/** 获取商户基本信息 */
getServiceBaseInfo
(
data
)
{
getServiceBaseInfo
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.serviceMerchant.getServiceBaseInfo'
,
projectName
:
'boutique'
,
...
data
})
},
},
/** 获取转化员上一笔订单的销售顾问 */
/** 获取转化员上一笔订单的销售顾问 */
getLastUserOrderInfo
(
data
)
{
getLastUserOrderInfo
(
data
)
{
return
http
.
post
({
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.getLastUser'
,
method
:
'dj.api.smartcarlife.order.getLastUser'
,
projectName
:
'boutique'
,
projectName
:
'boutique'
,
...
@@ -237,7 +237,38 @@ module.exports = {
...
@@ -237,7 +237,38 @@ module.exports = {
})
})
},
},
/**根据订单号获取订单详情(含套餐) */
/**根据订单号获取订单详情(含套餐) */
getPackageGoodsDetail
(
data
)
{
getPackageGoodsDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.packageGoodsDetail'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.order.packageGoodsDetail'
,
projectName
:
'boutique'
,
...
data
})
},
/**
* 查询日报门店主营品牌
*/
getDailyReportCarBrand
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.staff.daily.report.car.brand'
,
projectName
:
'boutique'
,
...
data
})
},
/**
* 查询员工日报是否填写列表
*
*/
getStaffDailyReportDetailWeeklyList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.staff.daily.report.weekly.list'
,
projectName
:
'boutique'
,
...
data
})
},
/**
* 查询日报详情
*/
getStaffDailyReportDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.staff.daily.report.detail'
,
projectName
:
'boutique'
,
...
data
})
}
}
}
}
pages/boutique/tool/index.vue
View file @
687c5dc
<
template
>
<
template
>
<view
class=
"detail-box"
>
<view
class=
"detail-box"
>
<view
class=
"nav-bar"
>
<view
class=
"nav-bar"
>
<view
class=
"back"
@
click=
"backPage"
>
<view
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
class=
"back"
@
click=
"backPage"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
</view>
<view
class=
"title"
>
展业工具
</view>
<view
class=
"title"
>
展业工具
</view>
</view>
</view>
...
@@ -10,18 +17,45 @@
...
@@ -10,18 +17,45 @@
<view
class=
"detail-left"
>
<view
class=
"detail-left"
>
<view
class=
"common-title"
>
展业
</view>
<view
class=
"common-title"
>
展业
</view>
<view
class=
"content"
>
<view
class=
"content"
>
<image
class=
"banner"
src=
"../../../assets/images/common/tool_banner.png"
mode=
"scaleToFill"
/>
<image
class=
"banner"
src=
"../../../assets/images/common/tool_banner.png"
mode=
"scaleToFill"
/>
<template
v-if=
"toolComponentName !== 'DailyReport'"
>
<template
v-if=
"toolComponentName !== 'DailyReport'"
>
<Entrance
@
entranceClick=
"entranceClick"
></Entrance>
<Entrance
@
entranceClick=
"entranceClick"
></Entrance>
</
template
>
</
template
>
<
template
v-else
></
template
>
<
template
v-else
>
<uni-calendar
ref=
"calendar"
:clearDate=
"false"
:endDate=
"endDate"
:showMonth=
"false"
@
monthSwitch=
"currentMonth = `$
{$event.year}-${$event.month}`"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
/>
</
template
>
</view>
</view>
</view>
</view>
<view
class=
"detail-right"
>
<view
class=
"detail-right"
>
<component
:is=
"toolComponentName"
@
jump=
"jump"
:transmission-of-data=
"transmissionOfData"
/>
<component
:is=
"toolComponentName"
@
jump=
"jump"
:transmission-of-data=
"transmissionOfData"
:currentDate=
"currentDate"
:currentMonth=
"currentMonth"
@
setCalendarSelected=
"selectedDays = $event"
/>
</view>
</view>
</view>
</view>
<NoticePopup
ref=
"notice"
title=
"重要提示"
text=
"当前页面暂未保存,是否确认退出"
type=
"warning"
></NoticePopup>
<NoticePopup
ref=
"notice"
title=
"重要提示"
text=
"当前页面暂未保存,是否确认退出"
type=
"warning"
></NoticePopup>
</view>
</view>
</template>
</template>
...
@@ -33,6 +67,7 @@ import DefeatOrder from './components/DefeatOrder.vue'
...
@@ -33,6 +67,7 @@ import DefeatOrder from './components/DefeatOrder.vue'
import
OrderManagement
from
'./components/OrderManagement.vue'
import
OrderManagement
from
'./components/OrderManagement.vue'
import
ConfirmOrder
from
'./components/ConfirmOrder.vue'
import
ConfirmOrder
from
'./components/ConfirmOrder.vue'
import
NoticePopup
from
'./components/NoticePopup.vue'
import
NoticePopup
from
'./components/NoticePopup.vue'
import
dayjs
from
'dayjs'
export
default
{
export
default
{
components
:
{
components
:
{
Entrance
,
Entrance
,
...
@@ -43,17 +78,21 @@ export default {
...
@@ -43,17 +78,21 @@ export default {
ConfirmOrder
,
ConfirmOrder
,
NoticePopup
NoticePopup
},
},
data
()
{
data
()
{
return
{
return
{
toolComponentName
:
''
,
toolComponentName
:
''
,
transmissionOfData
:
null
transmissionOfData
:
null
,
endDate
:
dayjs
().
format
(
'YYYY-MM-DD'
),
currentDate
:
dayjs
().
format
(
'YYYY-MM-DD'
),
currentMonth
:
dayjs
().
format
(
'YYYY-MM'
),
selectedDays
:
[]
}
}
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
.
componentName
)
this
.
toolComponentName
=
options
.
componentName
if
(
options
.
componentName
)
this
.
toolComponentName
=
options
.
componentName
},
},
methods
:
{
methods
:
{
entranceClick
(
item
)
{
entranceClick
(
item
)
{
console
.
log
(
item
)
console
.
log
(
item
)
// 保存当前选择的组件信息,但不立即切换
// 保存当前选择的组件信息,但不立即切换
const
selectedItem
=
item
const
selectedItem
=
item
...
@@ -88,17 +127,17 @@ export default {
...
@@ -88,17 +127,17 @@ export default {
// 打开弹窗
// 打开弹窗
this
.
$refs
.
notice
.
open
()
this
.
$refs
.
notice
.
open
()
},
},
backPage
()
{
backPage
()
{
uni
.
navigateBack
()
uni
.
navigateBack
()
},
},
// name:跳转组件名,val:跳转参数
// name:跳转组件名,val:跳转参数
jump
(
name
,
val
)
{
jump
(
name
,
val
)
{
this
.
toolComponentName
=
name
this
.
toolComponentName
=
name
console
.
log
(
this
.
toolComponentName
)
console
.
log
(
this
.
toolComponentName
)
if
(
val
)
{
if
(
val
)
{
this
.
transmissionOfData
=
val
this
.
transmissionOfData
=
val
}
}
}
}
,
}
}
}
}
</
script
>
</
script
>
...
...
uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
View file @
687c5dc
<
template
>
<
template
>
<view
class=
"uni-calendar-item__weeks-box"
:class=
"
{
<view
class=
"uni-calendar-item__weeks-box"
:class=
"
{
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate
&&
!weeks.isDay) ,
'uni-calendar-item--checked':(calendar.fullDate === weeks.fullDate
&&
!weeks.isDay) ,
...
@@ -7,10 +9,16 @@
...
@@ -7,10 +9,16 @@
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
}"
}"
@click="choiceDate(weeks)">
@click="choiceDate(weeks)"
>
<view
class=
"uni-calendar-item__weeks-box-item"
>
<view
class=
"uni-calendar-item__weeks-box-item"
>
<text
v-if=
"selected&&weeks.extraInfo"
class=
"uni-calendar-item__weeks-box-circle"
></text>
<text
<text
class=
"uni-calendar-item__weeks-box-text"
:class=
"
{
v-if=
"selected&&weeks.extraInfo"
class=
"uni-calendar-item__weeks-box-circle"
></text>
<text
class=
"uni-calendar-item__weeks-box-text"
:class=
"
{
'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay-text': weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate
&&
!weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate
&&
!weeks.isDay,
...
@@ -18,16 +26,24 @@
...
@@ -18,16 +26,24 @@
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--disable':weeks.disable,
}">
{{
weeks
.
date
}}
</text>
}"
<text
v-if=
"!lunar&&!weeks.extraInfo && weeks.isDay"
class=
"uni-calendar-item__weeks-lunar-text"
:class=
"
{
>
{{
weeks
.
date
}}
</text>
<text
v-if=
"!lunar&&!weeks.extraInfo && weeks.isDay"
class=
"uni-calendar-item__weeks-lunar-text"
:class=
"
{
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate
&&
!weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate
&&
!weeks.isDay,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--before-checked':weeks.beforeMultiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
}">
{{
todayText
}}
</text>
}"
<text
v-if=
"lunar&&!weeks.extraInfo"
class=
"uni-calendar-item__weeks-lunar-text"
:class=
"
{
>
{{
todayText
}}
</text>
<text
v-if=
"lunar&&!weeks.extraInfo"
class=
"uni-calendar-item__weeks-lunar-text"
:class=
"
{
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate
&&
!weeks.isDay,
'uni-calendar-item--checked':calendar.fullDate === weeks.fullDate
&&
!weeks.isDay,
...
@@ -35,8 +51,12 @@
...
@@ -35,8 +51,12 @@
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--disable':weeks.disable,
}">
{{
weeks
.
isDay
?
todayText
:
(
weeks
.
lunar
.
IDayCn
===
'初一'
?
weeks
.
lunar
.
IMonthCn
:
weeks
.
lunar
.
IDayCn
)
}}
</text>
}"
<text
v-if=
"weeks.extraInfo&&weeks.extraInfo.info"
class=
"uni-calendar-item__weeks-lunar-text"
:class=
"
{
>
{{
weeks
.
isDay
?
todayText
:
(
weeks
.
lunar
.
IDayCn
===
'初一'
?
weeks
.
lunar
.
IMonthCn
:
weeks
.
lunar
.
IDayCn
)
}}
</text>
<text
v-if=
"weeks.extraInfo&&weeks.extraInfo.info"
class=
"uni-calendar-item__weeks-lunar-text"
:class=
"
{
'uni-calendar-item--extra':weeks.extraInfo.info,
'uni-calendar-item--extra':weeks.extraInfo.info,
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay-text':weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
'uni-calendar-item--isDay':calendar.fullDate === weeks.fullDate
&&
weeks.isDay,
...
@@ -45,18 +65,19 @@
...
@@ -45,18 +65,19 @@
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--multiple': weeks.multiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--after-checked':weeks.afterMultiple,
'uni-calendar-item--disable':weeks.disable,
'uni-calendar-item--disable':weeks.disable,
}">
{{
weeks
.
extraInfo
.
info
}}
</text>
}"
>
{{
weeks
.
extraInfo
.
info
}}
</text>
</view>
</view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
{
initVueI18n
}
from
'@dcloudio/uni-i18n'
import
{
initVueI18n
}
from
'@dcloudio/uni-i18n'
import
i18nMessages
from
'./i18n/index.js'
import
i18nMessages
from
'./i18n/index.js'
const
{
t
}
=
initVueI18n
(
i18nMessages
)
const
{
t
}
=
initVueI18n
(
i18nMessages
)
export
default
{
export
default
{
emits
:
[
'change'
],
emits
:
[
'change'
],
props
:
{
props
:
{
weeks
:
{
weeks
:
{
type
:
Object
,
type
:
Object
,
...
@@ -82,27 +103,27 @@
...
@@ -82,27 +103,27 @@
}
}
},
},
computed
:
{
computed
:
{
todayText
()
{
todayText
()
{
return
t
(
"uni-calender.today"
)
return
t
(
"uni-calender.today"
)
},
},
},
},
methods
:
{
methods
:
{
choiceDate
(
weeks
)
{
choiceDate
(
weeks
)
{
this
.
$emit
(
'change'
,
weeks
)
this
.
$emit
(
'change'
,
weeks
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
$
uni-font-size-base
:
14px
;
$
uni-font-size-base
:
14px
;
$
uni-text-color
:
#333
;
$
uni-text-color
:
#37393D
;
$
uni-font-size-sm
:
12px
;
$
uni-font-size-sm
:
12px
;
$
uni-color-error
:
#e43d33
;
$
uni-color-error
:
#e43d33
;
$
uni-opacity-disabled
:
0
.3
;
$
uni-opacity-disabled
:
0
.3
;
$
uni-text-color-disable
:
#c0c0c0
;
$
uni-text-color-disable
:
#c0c0c0
;
$
uni-primary
:
#2979
ff
!
default
;
$
uni-primary
:
#4673
ff
!
default
;
.uni-calendar-item__weeks-box
{
.uni-calendar-item__weeks-box
{
flex
:
1
;
flex
:
1
;
/* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */
display
:
flex
;
display
:
flex
;
...
@@ -110,19 +131,19 @@
...
@@ -110,19 +131,19 @@
flex-direction
:
column
;
flex-direction
:
column
;
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
}
.uni-calendar-item__weeks-box-text
{
.uni-calendar-item__weeks-box-text
{
font-size
:
$
uni-font-size-base
;
font-size
:
$
uni-font-size-base
;
color
:
$
uni-text-color
;
color
:
$
uni-text-color
;
}
}
.uni-calendar-item__weeks-lunar-text
{
.uni-calendar-item__weeks-lunar-text
{
font-size
:
$
uni-font-size-sm
;
font-size
:
$
uni-font-size-sm
;
color
:
$
uni-text-color
;
color
:
$
uni-text-color
;
}
}
.uni-calendar-item__weeks-box-item
{
.uni-calendar-item__weeks-box-item
{
position
:
relative
;
position
:
relative
;
/* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */
display
:
flex
;
display
:
flex
;
...
@@ -132,56 +153,57 @@
...
@@ -132,56 +153,57 @@
align-items
:
center
;
align-items
:
center
;
width
:
100
rpx
;
width
:
100
rpx
;
height
:
100
rpx
;
height
:
100
rpx
;
}
}
.uni-calendar-item__weeks-box-circle
{
.uni-calendar-item__weeks-box-circle
{
position
:
absolute
;
position
:
absolute
;
top
:
5px
;
bottom
:
10
rpx
;
right
:
5px
;
left
:
50%
;
width
:
8px
;
transform
:
translate
(
-50%
,
-50%
);
height
:
8px
;
width
:
12
rpx
;
height
:
12
rpx
;
border-radius
:
8px
;
border-radius
:
8px
;
background-color
:
$
uni-color-error
;
background-color
:
$
uni-color-error
;
}
}
.uni-calendar-item--disable
{
//
background-color
:
rgba
(
249
,
249
,
249
,
$
uni-opacity-disabled
);
.uni-calendar-item--disable
{
background-color
:
rgba
(
249
,
249
,
249
,
$
uni-opacity-disabled
);
color
:
$
uni-text-color-disable
;
color
:
$
uni-text-color-disable
;
}
}
.uni-calendar-item--isDay-text
{
.uni-calendar-item--isDay-text
{
color
:
$
uni-primary
;
color
:
$
uni-primary
;
}
}
.uni-calendar-item--isDay
{
.uni-calendar-item--isDay
{
background-color
:
$
uni-primary
;
background-color
:
$
uni-primary
;
opacity
:
0.8
;
//
opacity
:
0.8
;
color
:
#fff
;
color
:
#fff
;
}
border-radius
:
16
rpx
;
}
.uni-calendar-item--extra
{
.uni-calendar-item--extra
{
color
:
$
uni-color-error
;
color
:
$
uni-color-error
;
opacity
:
0.8
;
opacity
:
0.8
;
}
}
.uni-calendar-item--checked
{
.uni-calendar-item--checked
{
background-color
:
$
uni-primary
;
background-color
:
$
uni-primary
;
color
:
#fff
;
color
:
#fff
;
opacity
:
0.8
;
opacity
:
0.8
;
}
}
.uni-calendar-item--multiple
{
.uni-calendar-item--multiple
{
background-color
:
$
uni-primary
;
background-color
:
$
uni-primary
;
color
:
#fff
;
color
:
#fff
;
opacity
:
0.8
;
opacity
:
0.8
;
}
}
.uni-calendar-item--before-checked
{
.uni-calendar-item--before-checked
{
background-color
:
#ff5a5f
;
background-color
:
#ff5a5f
;
color
:
#fff
;
color
:
#fff
;
}
}
.uni-calendar-item--after-checked
{
.uni-calendar-item--after-checked
{
background-color
:
#ff5a5f
;
background-color
:
#ff5a5f
;
color
:
#fff
;
color
:
#fff
;
}
}
</
style
>
</
style
>
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
View file @
687c5dc
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
v-if=
"insert || show"
v-if=
"insert || show"
class=
"uni-calendar__content"
class=
"uni-calendar__content"
:class=
"
{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}"
:class=
"
{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow}"
:style="[{backgroundColor:backgroundColor}]"
>
>
<view
<view
v-if=
"!insert"
v-if=
"!insert"
...
@@ -182,6 +183,10 @@ export default {
...
@@ -182,6 +183,10 @@ export default {
rangeValue
:
{
rangeValue
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
{
}
}
default
:
()
=>
{
{
}
}
},
backgroundColor
:{
type
:
String
,
default
:
'#fff'
}
}
},
},
data
()
{
data
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment