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 2e31f2ed
authored
Aug 25, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'V4.56.0' of
http://192.168.3.233:8090/glsx/gl_tape
into V4.56.0
2 parents
5122740f
7a06363e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
610 additions
and
4 deletions
api/module/boutique.js
pages/boutique/tool/components/DailyReport.vue
api/module/boutique.js
View file @
2e31f2e
...
@@ -308,6 +308,16 @@ module.exports = {
...
@@ -308,6 +308,16 @@ module.exports = {
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
// dj.api.smartcarlife.serviceMerchant.getByMerchantId
return
http
.
post
({
method
:
'dj.api.smartcarlife.common.createWeappQrcode'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.common.createWeappQrcode'
,
projectName
:
'boutique'
,
...
data
})
},
},
/**
* 保存日报
*/
saveStaffDailyReport
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.staff.daily.report.save'
,
projectName
:
'boutique'
,
...
data
})
},
/** 不升级常用字符列表 */
/** 不升级常用字符列表 */
getConfigList
(
data
)
{
getConfigList
(
data
)
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.config.list'
,
projectName
:
'boutique'
,
...
data
})
return
http
.
post
({
method
:
'dj.api.smartcarlife.config.list'
,
projectName
:
'boutique'
,
...
data
})
...
...
pages/boutique/tool/components/DailyReport.vue
View file @
2e31f2e
<
template
>
<
template
>
<view>
<!-- :key="dateKey" -->
<view
class=
"daily-report"
>
<view
class=
"common-title"
>
填写日报
</view>
<view
class=
"common-title"
>
填写日报
</view>
<scroll-view
:class=
"['repoet-view',
{full:!orderObj.isDateWithin7Days}]"
scroll-y
>
<template
v-if=
"loadComplete"
>
<view
class=
"box"
>
<view
class=
"sub-title"
>
轻改日报
</view>
<template
v-for=
"(i,index) in formObject.report"
>
<view
class=
"form-item flex"
:key=
"index"
>
<view
class=
"label flex"
>
{{
i
.
label
}}
<template
v-if=
"i.required"
>
<view
class=
"required"
>
*
</view>
</
template
>
</view>
<view
class=
"value flex"
>
<
template
v-if=
"i.type == 'input'"
>
<input
class=
"input"
:type=
"i.inputType || 'text'"
:value=
"orderObj[i.value]"
:placeholder=
"i.placeholder || '请输入'"
placeholder-class=
"placeholder"
@
blur=
"handleBlur($event, i)"
:disabled=
"filterDisabled(isEditReport)"
>
</
template
>
<
template
v-else-if=
"i.type == 'picker'"
>
<picker
class=
"picker flex"
:value=
"orderObj[i.value]"
:range=
"i.range"
:range-key=
"i.rangeKey"
@
change=
"orderObj[i.value] = $event.detail.value"
:disabled=
"filterDisabled(isEditReport)"
>
{{
i
.
range
[
orderObj
[
i
.
value
]][
i
.
rangeKey
]
||
''
}}
<uni-icons
type=
"right"
:size=
"16"
color=
"#999"
class=
"arrow"
></uni-icons>
</picker>
</
template
>
<
template
v-else
>
{{
orderObj
[
i
.
value
]
}}
</
template
>
</view>
</view>
</template>
</view>
<view
class=
"box"
>
<view
class=
"sub-title"
>
其他信息
</view>
<view
class=
"form-item flex"
>
<view
class=
"label flex"
>
备注
</view>
<view
class=
"value"
>
<input
class=
"input"
type=
"text"
v-model=
"orderObj.remark"
placeholder-class=
"placeholder"
placeholder=
"请输入 (500字以内)"
:maxlength=
"500"
:disabled=
"filterDisabled(isEditReport)"
>
</view>
</view>
</view>
<
template
v-for=
"(item,index) in carBandList"
>
<view
class=
"box"
:key=
"index"
>
<view
class=
"sub-title flex"
>
{{
title
(
item
)
}}
<view
class=
"staff-name"
v-if=
"orderObj.staffName && index == 0"
>
{{
orderObj
.
staffName
}}
</view>
</view>
<template
v-for=
"(i,ind) in filterTemplateList"
>
<view
:class=
"['form-item flex',
{name:i.name}]"
:key="ind"
>
<template
v-if=
"i.name"
>
个人相关
</
template
>
<
template
v-else
>
<view
class=
"label flex"
>
{{
i
.
label
}}
<template
v-if=
"i.required"
>
<view
class=
"required"
>
*
</view>
</
template
>
</view>
<view
class=
"value flex"
>
<input
class=
"input"
:type=
"i.type || 'text'"
:value=
"item[i.key]"
:placeholder=
"i.inputPlaceholder || '请输入'"
placeholder-class=
"placeholder"
@
blur=
"handleCarInputBlur($event, i , item)"
:disabled=
"filterDisabled(isEditReport) || i.disabled"
>
</view>
</template>
</view>
</template>
</view>
</template>
</template>
</scroll-view>
<
template
v-if=
"orderObj.isDateWithin7Days"
>
<view
class=
"btn-box flex"
>
<template
v-if=
"filterDisabled()"
>
<template
v-if=
"!isEditReport"
>
<view
class=
"btn"
@
click=
"isEditReport = true"
>
编辑
</view>
</
template
>
<
template
v-else
>
<view
class=
"btn cancel-btn"
@
click=
"isEditReport = false"
>
取消
</view>
<view
class=
"btn"
@
click=
"submit"
>
保存
</view>
</
template
>
</template>
<
template
v-else
>
<view
class=
"btn"
@
click=
"submit"
>
提交
</view>
</
template
>
</view>
</template>
</view>
</view>
</template>
</template>
<
script
>
<
script
type=
'text/ecmascript-6'
>
var
weekday
=
require
(
'dayjs/plugin/weekday'
)
import
dayjs
from
'dayjs'
dayjs
.
extend
(
weekday
)
import
GlCell
from
'@/components/Form/GlCell.vue'
export
default
{
export
default
{
components
:
{
GlCell
},
props
:
{
currentDate
:
String
,
currentMonth
:
String
},
name
:
'DailyReport'
,
name
:
'DailyReport'
,
data
()
{
data
()
{
return
{
return
{
dateKey
:
Date
.
now
(),
loadComplete
:
false
,
formObject
:
{
report
:
[
{
label
:
'今日驻店人数(按店)'
,
value
:
'staffCount'
,
type
:
'input'
,
required
:
true
,
inputType
:
'number'
},
{
label
:
'当日调休'
,
value
:
'pickerValue'
,
type
:
'picker'
,
required
:
true
,
rangeKey
:
'name'
,
range
:
[
{
id
:
'N'
,
name
:
'否'
},
{
id
:
'Y'
,
name
:
'是'
}
]
},
{
label
:
'个人成交总金额'
,
value
:
'totalOrderMoney'
,
},
]
},
orderObj
:
{},
carBandList
:
[],
hwOhterObjArray
:
[
{
label
:
'店端实际交车数'
,
key
:
'deliveryCount'
,
type
:
'number'
,
required
:
true
,
min
:
0
,
max
:
100
,
},
{
label
:
'店端总未触客数'
,
key
:
'notDeliveryCount'
,
type
:
'number'
,
required
:
true
,
min
:
0
,
max
:
100
,
},
{
label
:
'实际售前触客数'
,
key
:
'equityToShopCount'
,
type
:
'number'
,
required
:
true
,
min
:
0
,
max
:
100
,
inputPlaceholder
:
''
},
{
label
:
'实际售后触客数'
,
key
:
'afterSaleEquityToShopCount'
,
type
:
'number'
,
required
:
false
,
min
:
0
,
max
:
100
,
},
{
name
:
'person'
},
{
label
:
'今日成交数'
,
key
:
'totalOrderCount'
,
type
:
'number'
,
required
:
false
,
min
:
0
,
max
:
100
,
templateValue
:
3
,
disabled
:
true
,
inputPlaceholder
:
'自动填入系统数据'
}
],
weeklyList
:
[],
isEditReport
:
false
}
},
computed
:
{
userInfo
()
{
return
uni
.
$storage
.
get
(
"userInfo"
)
},
mouthNumber
()
{
return
dayjs
(
this
.
currentMonth
).
daysInMonth
()
},
filterTemplateList
()
{
let
{
hwOhterObjArray
,
orderObj
:
{
templateType
}
}
=
this
if
(
templateType
==
3
)
{
return
hwOhterObjArray
.
filter
(
function
(
item
)
{
return
item
.
templateValue
!=
3
})
}
else
{
return
hwOhterObjArray
}
},
},
watch
:
{
currentMonth
:
{
handler
(
val
)
{
this
.
setMonthDay
()
},
deep
:
true
,
immediate
:
true
},
currentDate
:
{
handler
(
val
)
{
this
.
getStaffDailyReportDetail
()
// console.log(val)
},
deep
:
true
,
// immediate: true
}
},
mounted
()
{
this
.
initData
()
this
.
getDailyReportCarBrand
()
},
methods
:
{
initData
()
{
const
{
merchantId
,
merchantName
,
name
,
uuid
,
shopMerchantId
,
shopMerchantName
}
=
this
.
userInfo
this
.
orderObj
=
{
yqMerchantId
:
merchantId
,
yqMerchantName
:
merchantName
,
staffName
:
name
,
staffUuid
:
uuid
,
merchantId
:
shopMerchantId
,
merchantName
:
shopMerchantName
}
this
.
getStaffDailyReportDetail
()
},
async
getDailyReportCarBrand
()
{
let
{
userInfo
}
=
this
,
{
shopMerchantId
}
=
userInfo
const
data
=
await
uni
.
$api
.
boutiqueApi
.
getDailyReportCarBrand
({
merchantId
:
shopMerchantId
,
sceneType
:
1
})
this
.
carBandList
=
data
console
.
log
(
this
.
carBandList
)
},
setMonthDay
()
{
let
{
mouthNumber
}
=
this
,
currentMonth
=
dayjs
(
this
.
currentMonth
).
format
(
'YYYY-MM'
),
nowYear
=
dayjs
(
currentMonth
).
format
(
'YYYY'
),
nowMonth
=
dayjs
(
currentMonth
).
format
(
'MM'
),
maxDay
=
dayjs
().
format
(
'D'
),
maxMonth
=
dayjs
().
format
(
'YYYY-MM'
),
dayNum
=
currentMonth
<
maxMonth
?
mouthNumber
:
maxDay
,
weekDayList
=
[]
if
(
currentMonth
>
maxMonth
)
return
for
(
let
i
=
1
;
i
<=
dayNum
;
i
++
)
{
let
date
=
dayjs
(
`
${
nowYear
}
-
${
nowMonth
}
-
${
i
}
`
).
format
(
'YYYY-MM-DD'
),
week
=
[
'日'
,
'一'
,
'二'
,
'三'
,
'四'
,
'五'
,
'六'
][
dayjs
(
date
).
weekday
()]
weekDayList
.
push
({
day
:
i
,
date
,
week
,
disabled
:
false
})
}
let
startDay
=
weekDayList
[
0
].
date
,
endDay
=
weekDayList
[
weekDayList
.
length
-
1
].
date
let
params
=
{
weekDayList
,
yearMonth
:
currentMonth
,
starDay
:
1
,
starDayLabel
:
dayjs
(
startDay
).
format
(
'YYYY/MM/DD'
),
reportStartDate
:
startDay
,
endDayLabel
:
dayjs
(
endDay
).
format
(
'YYYY/MM/DD'
),
reportEndDate
:
endDay
,
formatYearMonth
:
currentMonth
}
this
.
getStaffDailyReportDetailWeeklyList
(
params
)
},
async
getStaffDailyReportDetailWeeklyList
(
params
)
{
let
{
shopMerchantId
,
merchantId
,
uuid
}
=
this
.
userInfo
const
data
=
await
uni
.
$api
.
boutiqueApi
.
getStaffDailyReportDetailWeeklyList
({
staffUuid
:
uuid
,
yqMerchantId
:
merchantId
,
merchantId
:
shopMerchantId
,
...
params
,
sceneType
:
1
,
reportTypeList
:
[
-
1
]
})
let
selectedDay
=
[]
params
.
weekDayList
.
map
(
e
=>
{
let
{
date
}
=
e
if
(
!
data
.
includes
(
date
))
selectedDay
.
push
({
date
})
})
this
.
weeklyList
=
data
this
.
$emit
(
'setCalendarSelected'
,
selectedDay
)
},
async
getStaffDailyReportDetail
()
{
this
.
isEditReport
=
false
this
.
loadComplete
=
false
let
{
currentDate
,
userInfo
,
carBandList
,
hwOhterObjArray
,
orderObj
}
=
this
,
{
shopMerchantId
,
merchantId
,
uuid
}
=
userInfo
const
data
=
await
uni
.
$api
.
boutiqueApi
.
getStaffDailyReportDetail
({
yqMerchantId
:
merchantId
,
merchantId
:
shopMerchantId
,
staffUuid
:
uuid
,
reportDate
:
currentDate
,
sceneType
:
1
,
reportTypeList
:
[
-
1
]
})
let
{
brandDataList
,
remark
}
=
data
if
(
brandDataList
&&
brandDataList
.
length
)
{
carBandList
=
carBandList
.
map
(
item
=>
{
let
carBand
=
brandDataList
.
find
(
ele
=>
{
if
([
0
,
1
].
includes
(
ele
.
brandType
))
{
return
ele
.
brandType
==
item
.
brandType
}
else
if
(
ele
.
brandType
==
2
)
{
return
ele
.
firstBrandId
==
item
.
firstBrandId
}
})
if
(
carBand
!=
null
)
{
let
{
firstBrandId
,
firstBrandName
,
brandId
,
brandName
,
brandType
}
=
item
item
=
{
...
carBand
,
firstBrandId
,
firstBrandName
,
brandId
,
brandName
,
brandType
}
}
else
{
hwOhterObjArray
.
forEach
(
e
=>
{
item
[
e
.
key
]
=
null
})
}
item
.
error
=
false
return
item
})
}
hwOhterObjArray
=
hwOhterObjArray
.
map
(
item
=>
{
item
.
error
=
false
return
item
})
let
diffDay
=
dayjs
().
diff
(
dayjs
(
currentDate
),
'day'
)
this
.
hwOhterObjArray
=
hwOhterObjArray
this
.
carBandList
=
carBandList
this
.
orderObj
=
{
...
orderObj
,
reportDate
:
currentDate
,
isDateWithin7Days
:
diffDay
<
7
,
isDateWithin60Days
:
diffDay
<
60
,
remark
,
lastStaffName
:
data
.
lastStaffName
,
lastStaffUuid
:
data
.
lastStaffUuid
,
recordStaffCount
:
data
.
staffCount
,
totalOrderMoney
:
data
.
totalOrderMoney
,
totalOrderCount
:
data
.
totalOrderCount
,
glWorryFreeCount
:
data
.
glWorryFreeCount
,
cancelOrderCount
:
data
.
cancelOrderCount
,
cancelOrderMoney
:
data
.
cancelOrderMoney
,
templateType
:
data
.
templateType
||
0
,
staffCount
:
data
.
staffCount
,
onBreak
:
data
.
onBreak
||
'N'
,
pickerValue
:
data
.
onBreak
==
'Y'
?
1
:
0
,
staffCountError
:
false
,
}
this
.
loadComplete
=
true
},
title
(
item
)
{
let
title
=
''
if
(
item
.
brandType
==
0
)
title
=
'问界'
if
(
item
.
brandType
==
1
)
title
=
'鸿蒙'
return
title
||
item
.
firstBrandName
},
handleBlur
(
e
,
i
)
{
let
{
value
}
=
e
.
detail
if
(
value
)
{
let
key
=
i
.
value
,
numbers
=
value
.
match
(
/
\d
+/g
)
numbers
=
numbers
?
numbers
.
join
(
''
)
:
''
if
(
numbers
.
length
>
1
)
numbers
=
numbers
.
replace
(
/^0+/
,
''
)
this
.
orderObj
[
key
]
=
Math
.
min
(
Math
.
max
(
Number
(
numbers
),
0
),
100
).
toString
()
this
.
dateKey
=
Date
.
now
()
}
},
handleCarInputBlur
(
e
,
i
,
item
)
{
let
{
value
}
=
e
.
detail
if
(
value
)
{
let
{
key
}
=
i
,
numbers
=
value
.
match
(
/
\d
+/g
)
numbers
=
numbers
?
numbers
.
join
(
''
)
:
''
if
(
numbers
.
length
>
1
)
numbers
=
numbers
.
replace
(
/^0+/
,
''
)
item
[
key
]
=
Math
.
min
(
Math
.
max
(
Number
(
numbers
),
0
),
100
).
toString
()
this
.
dateKey
=
Date
.
now
()
}
},
async
submit
()
{
try
{
let
{
orderObj
,
carBandList
}
=
this
orderObj
.
isAdmin
=
false
orderObj
.
oprBy
=
orderObj
.
staffUuid
orderObj
.
sceneType
=
1
orderObj
.
brandDataList
=
carBandList
if
(
orderObj
.
onBreak
==
'Y'
)
{
orderObj
.
brandDataList
.
forEach
(
item
=>
{
item
.
notDeliveryCount
=
item
.
notDeliveryCount
||
0
item
.
equityToShopCount
=
item
.
equityToShopCount
||
0
})
}
const
data
=
await
uni
.
$api
.
boutiqueApi
.
saveStaffDailyReport
(
orderObj
)
if
(
data
)
{
this
.
isEditReport
=
false
}
}
catch
(
error
)
{
}
},
filterDisabled
(
disabledStatus
)
{
let
{
weeklyList
,
currentDate
,
orderObj
:
{
isDateWithin7Days
}
}
=
this
return
weeklyList
.
includes
(
currentDate
)
&&
!
disabledStatus
||
!
isDateWithin7Days
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
'scss'
>
.daily-report
{
height
:
100%
;
.repoet-view
{
height
:
calc
(
100%
-
248
rpx
);
}
.full
{
height
:
calc
(
100%
-
120
rpx
);
}
.box
{
margin
:
0
48
rpx
16
rpx
;
border-radius
:
16
rpx
;
background
:
#ffffff
;
padding-left
:
32
rpx
;
.sub-title
{
line-height
:
48
rpx
;
padding
:
16
rpx
32
rpx
8
rpx
0
;
color
:
#777777
;
font-size
:
24
rpx
;
.staff-name
{
margin-left
:
auto
;
color
:
#4673ff
;
font-size
:
24
rpx
;
}
}
.form-item
{
height
:
96
rpx
;
border-bottom
:
2
rpx
solid
#f7f7f6
;
padding-right
:
32
rpx
;
font-size
:
28
rpx
;
color
:
#333333
;
&:last-of-type
{
border-bottom
:
none
;
}
.label
{
flex-shrink
:
0
;
.required
{
color
:
#f24724
;
font-size
:
28
rpx
;
margin-left
:
8
rpx
;
}
}
.value
{
width
:
100%
;
height
:
100%
;
justify-content
:
flex-end
;
.input,
.picker
{
width
:
100%
;
height
:
100%
;
text-align
:
right
;
line-height
:
96
rpx
;
justify-content
:
flex-end
;
.arrow
{
position
:
relative
;
top
:
2
rpx
;
margin-left
:
4
rpx
;
}
}
.placeholder
{
color
:
#999999
;
font-size
:
28
rpx
;
}
.textarea
{
width
:
100%
;
}
}
}
.name
{
line-height
:
48
rpx
;
height
:
72
rpx
;
color
:
#777777
;
font-size
:
24
rpx
;
border-bottom
:
none
;
}
}
.btn-box
{
height
:
128
rpx
;
padding
:
0
128
rpx
;
gap
:
0
32
rpx
;
.btn
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
width
:
100%
;
height
:
80
rpx
;
border-radius
:
48
rpx
;
border
:
2
rpx
solid
#979797
;
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
color
:
#ffffff
;
font-size
:
28
rpx
;
font-weight
:
500
;
}
.cancel-btn
{
background
:
#3b73ff1
a
;
color
:
#4673ff
;
border
:
2
rpx
solid
#fff
;
}
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
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