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 72e50190
authored
Jul 28, 2026
by
岑成威
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.8.4' of 192.168.3.233:glsx/gl_tape into SAAS+V5.8.4
2 parents
28a772b8
c4761aaf
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
96 additions
and
102 deletions
api/module/dailyTemplateApi.js
pages/common/dailyNewspaper/NegotiationDetail/edit.vue
pages/common/dailyNewspaper/NegotiationDetail/index.vue
pages/common/dailyNewspaper/StaffDailyReport/edit.vue
pages/common/dailyNewspaper/StaffDailyReport/index.vue
pages/common/dailyNewspaper/StoreDailyReport/edit.vue
pages/common/dailyNewspaper/StoreDailyReport/index.vue
pages/common/dailyNewspaper/index.vue
pages/common/dailyNewspaper/mixins.js
api/module/dailyTemplateApi.js
View file @
72e5019
...
...
@@ -79,21 +79,21 @@ const getDiscussionStaffList = async (data = {}) => {
})
}
/**
日报
草稿数据
保存
日报保存
*/
const
saveDraft
=
async
(
data
=
{})
=>
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.dailyReport.dynamic.
draft.
save'
,
method
:
'dj.api.smartcarlife.dailyReport.dynamic.save'
,
projectName
:
'boutique'
,
...
data
})
}
/**
日报数据
提交
日报数据
推送
*/
const
submitReport
=
async
(
data
=
{})
=>
{
return
http
.
post
({
method
:
'dj.api.smartcarlife.dailyReport.dynamic.
save
'
,
method
:
'dj.api.smartcarlife.dailyReport.dynamic.
data.push
'
,
projectName
:
'boutique'
,
...
data
})
...
...
pages/common/dailyNewspaper/NegotiationDetail/edit.vue
View file @
72e5019
...
...
@@ -44,7 +44,7 @@
<view
class=
"footer"
>
<Footer>
<view
class=
"btn default-btn"
@
click=
"saveBtn = true"
v-if=
"!saveBtn"
>
编辑
</view>
<view
class=
"btn"
@
click=
"$emit('s
ubmit
Report', list)"
v-else
>
保存
</view>
<view
class=
"btn"
@
click=
"$emit('s
ave
Report', list)"
v-else
>
保存
</view>
</Footer>
</view>
</template>
...
...
pages/common/dailyNewspaper/NegotiationDetail/index.vue
View file @
72e5019
...
...
@@ -4,7 +4,7 @@
<Detail
:templateData=
"templateData"
/>
</
template
>
<
template
v-else
>
<Edit
:templateData=
"templateData"
@
s
ubmitReport=
"submit
Report"
@
getSaveBtnStatus=
"saveBtnStatus = $event"
<Edit
:templateData=
"templateData"
@
s
aveReport=
"save
Report"
@
getSaveBtnStatus=
"saveBtnStatus = $event"
:ReportStatus=
"ReportStatus"
@
maxLengthError=
"$emit('maxLengthError',$event)"
:currentDate=
"currentDate"
/>
</
template
>
</view>
...
...
pages/common/dailyNewspaper/StaffDailyReport/edit.vue
View file @
72e5019
...
...
@@ -41,7 +41,7 @@
<view
class=
"footer"
>
<Footer>
<view
class=
"btn default-btn"
@
click=
"saveBtn = true"
v-if=
"!saveBtn"
>
编辑
</view>
<view
class=
"btn"
@
click=
"$emit('s
ubmit
Report', list)"
v-else
>
保存
</view>
<view
class=
"btn"
@
click=
"$emit('s
ave
Report', list)"
v-else
>
保存
</view>
</Footer>
</view>
</template>
...
...
pages/common/dailyNewspaper/StaffDailyReport/index.vue
View file @
72e5019
...
...
@@ -4,7 +4,7 @@
<Detail
:templateData=
"templateData"
/>
</
template
>
<
template
v-else
>
<Edit
:templateData=
"templateData"
@
s
ubmitReport=
"submit
Report"
@
getSaveBtnStatus=
"saveBtnStatus = $event"
<Edit
:templateData=
"templateData"
@
s
aveReport=
"save
Report"
@
getSaveBtnStatus=
"saveBtnStatus = $event"
:ReportStatus=
"ReportStatus"
/>
</
template
>
</view>
...
...
pages/common/dailyNewspaper/StoreDailyReport/edit.vue
View file @
72e5019
...
...
@@ -47,11 +47,11 @@
</view>
<view
class=
"footer"
>
<Footer>
<view
:class=
"['btn default-btn', { w50: !saveBtn }]"
@
click=
"$emit('showNegotiationList')"
>
查看洽谈明细表汇总
</view>
<view
:class=
"['btn default-btn',{w50:!saveBtn}]"
@
click=
"saveBtn = true"
v-if=
"!saveBtn"
>
编辑
</view>
<view
:class=
"['btn default-btn', { w50: !saveBtn
|| !showPushBtn
}]"
@
click=
"$emit('showNegotiationList')"
>
查看洽谈明细表汇总
</view>
<view
:class=
"['btn default-btn',{w50:!saveBtn
|| !showPushBtn
}]"
@
click=
"saveBtn = true"
v-if=
"!saveBtn"
>
编辑
</view>
<
template
v-else
>
<view
class=
"btn default-btn
"
@
click=
"$emit('saveReport', list)"
>
保存
</view>
<view
class=
"btn"
@
click=
"$emit('submitReport', list
)
"
>
上报数据
</view>
<view
:class=
"['btn default-btn',
{w50:!showPushBtn}]
" @click="$emit('saveReport', list)">保存
</view>
<view
class=
"btn"
@
click=
"$emit('submitReport', list
)"
v-if=
"showPushBtn
"
>
上报数据
</view>
</
template
>
</Footer>
</view>
...
...
@@ -82,7 +82,9 @@ export default {
default
:
()
=>
[]
},
reportDate
:
String
,
ReportStatus
:
null
ReportStatus
:
null
,
isToday
:
Boolean
,
SubmissionStatus
:
null
},
data
()
{
return
{
...
...
@@ -91,6 +93,11 @@ export default {
saveBtn
:
true
}
},
computed
:
{
showPushBtn
(){
return
this
.
SubmissionStatus
!=
1
&&
this
.
isToday
}
},
watch
:
{
templateData
:
{
handler
(
val
)
{
...
...
pages/common/dailyNewspaper/StoreDailyReport/index.vue
View file @
72e5019
...
...
@@ -7,7 +7,7 @@
<
template
v-else
>
<Edit
:templateData=
"templateData"
@
showNegotiationList=
"changeComponent(true)"
@
saveReport=
"saveReport"
@
submitReport=
"submitReport"
:reportDate=
"currentDate"
:ReportStatus=
"ReportStatus"
@
getSaveBtnStatus=
"saveBtnStatus = $event"
/>
@
getSaveBtnStatus=
"saveBtnStatus = $event"
:SubmissionStatus=
"SubmissionStatus"
:isToday=
"isToday"
/>
</
template
>
</view>
...
...
pages/common/dailyNewspaper/index.vue
View file @
72e5019
...
...
@@ -25,7 +25,8 @@
<view
class=
"detail-right"
>
<component
:ref=
"`ref-$
{componentName}`" :is="componentName" :templateData="templateData"
:currentDate="currentDate" @changeComponent="changeComponent" @submitReport="submitReport"
@saveReportStatus="saveReportStatus" :ReportStatus="reportStatus" @maxLengthError="maxLengthError" />
@saveReportStatus="saveReportStatus" :ReportStatus="reportStatus" @maxLengthError="maxLengthError"
:SubmissionStatus="submissionStatus" :submissionDate="submissionDate" />
</view>
</view>
<NoticePopup
ref=
"notice"
:title=
"noticeObj.title"
:text=
"noticeObj.text"
:type=
"noticeObj.type || 'success'"
...
...
@@ -56,7 +57,8 @@ export default {
userInfo
:
this
.
userInfo
,
templateType
:
()
=>
this
.
templateType
,
dailyReportRecordId
:
()
=>
this
.
dailyReportRecordId
,
reportStatus
:
()
=>
this
.
reportStatus
reportStatus
:
()
=>
this
.
reportStatus
,
submissionStatus
:
()
=>
this
.
submissionStatus
}
},
data
()
{
...
...
@@ -74,7 +76,9 @@ export default {
assignTitle
:
''
,
assignIcon
:
''
,
dailyReportRecordId
:
''
,
reportStatus
:
''
reportStatus
:
''
,
submissionStatus
:
''
,
submissionDate
:
''
}
},
onBackPress
(
options
)
{
...
...
@@ -283,8 +287,8 @@ export default {
// if (templateType != 1) {
// if (!componentRef.isToday) return false
// } else {
let
lastDay
=
dayjs
().
subtract
(
30
,
'day'
)
if
(
!
lastDay
.
isBefore
(
dayjs
(
currentDate
),
'day'
))
return
false
let
lastDay
=
dayjs
().
subtract
(
30
,
'day'
)
if
(
!
lastDay
.
isBefore
(
dayjs
(
currentDate
),
'day'
))
return
false
// }
return
templateData
.
length
?
componentRef
.
saveBtnStatus
:
false
...
...
@@ -330,9 +334,10 @@ export default {
this
.
noticeObj
=
noticeObj
this
.
$refs
.
notice
.
open
()
},
async
getReportDetail
()
{
async
getReportDetail
(
getDailyReportRecordId
=
false
)
{
this
.
reportStatus
=
''
this
.
dailyReportRecordId
=
''
this
.
submissionDate
=
''
uni
.
showLoading
({
title
:
'加载中...'
,
mask
:
true
})
try
{
const
{
uuid
,
shopMerchantId
}
=
this
.
userInfo
,
...
...
@@ -349,37 +354,42 @@ export default {
if
(
data
)
{
uni
.
hideLoading
()
this
.
dailyReportRecordId
=
data
.
id
this
.
reportStatus
=
data
.
reportStatus
let
templateData
=
JSON
.
parse
(
data
.
jsonContent
||
'[]'
)
templateData
.
forEach
(
e
=>
{
if
(
e
.
childrenValue
&&
e
.
childrenValue
.
length
>
0
)
{
const
children
=
e
.
childrenValue
.
map
(
c
=>
{
// 每次循环创建新的深拷贝,避免引用共享问题
const
originChildren
=
utils
.
deepClone
(
e
.
origin_children
)
originChildren
.
forEach
(
item
=>
{
const
key
=
item
.
key
const
val
=
c
[
e
.
key
]?.[
key
]
if
(
getDailyReportRecordId
)
return
Promise
.
resolve
(
data
.
id
)
else
{
this
.
reportStatus
=
data
.
reportStatus
let
templateData
=
JSON
.
parse
(
data
.
jsonContent
||
'[]'
)
templateData
.
forEach
(
e
=>
{
if
(
e
.
childrenValue
&&
e
.
childrenValue
.
length
>
0
)
{
const
children
=
e
.
childrenValue
.
map
(
c
=>
{
// 每次循环创建新的深拷贝,避免引用共享问题
const
originChildren
=
utils
.
deepClone
(
e
.
origin_children
)
originChildren
.
forEach
(
item
=>
{
const
key
=
item
.
key
const
val
=
c
[
e
.
key
]?.[
key
]
if
([
'string'
,
'number'
].
includes
(
typeof
val
))
{
item
.
value
=
val
}
else
if
(
val
)
{
item
.
value
=
val
.
text
item
[
key
]
=
val
.
value
}
if
([
'string'
,
'number'
].
includes
(
typeof
val
))
{
item
.
value
=
val
}
else
if
(
val
)
{
item
.
value
=
val
.
text
item
[
key
]
=
val
.
value
}
})
return
originChildren
})
return
originChildren
})
e
.
children
=
children
}
else
{
if
(
!
e
.
children
)
e
.
children
=
[]
}
})
this
.
templateData
=
templateData
e
.
children
=
children
}
else
{
if
(
!
e
.
children
)
e
.
children
=
[]
}
})
this
.
templateData
=
templateData
this
.
submissionStatus
=
data
.
submissionStatus
this
.
submissionDate
=
data
.
submissionDate
}
}
else
{
// if (this.templateType == 1) {
let
lastDay
=
dayjs
().
subtract
(
30
,
'day'
)
if
(
lastDay
.
isBefore
(
dayjs
(
currentDate
),
'day'
))
this
.
getDailyTemplate
()
else
uni
.
hideLoading
()
let
lastDay
=
dayjs
().
subtract
(
30
,
'day'
)
if
(
lastDay
.
isBefore
(
dayjs
(
currentDate
),
'day'
))
this
.
getDailyTemplate
()
else
uni
.
hideLoading
()
// } else {
// if (nowDate == currentDate) this.getDailyTemplate()
// else uni.hideLoading()
...
...
@@ -438,12 +448,17 @@ export default {
}
this
.
$refs
.
notice
.
close
()
uni
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
})
const
data
=
await
uni
.
$api
.
dailyTemplateApi
.
submitReport
(
reportParams
)
uni
.
hideLoading
()
if
(
data
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
mask
:
true
})
this
.
saveReportStatus
(
data
)
const
saveData
=
await
uni
.
$api
.
dailyTemplateApi
.
saveDraft
(
reportParams
)
if
(
saveData
)
{
const
dailyReportRecordId
=
await
this
.
getReportDetail
(
true
),
data
=
await
uni
.
$api
.
dailyTemplateApi
.
submitReport
({
dailyReportRecordId
})
uni
.
hideLoading
()
if
(
data
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
mask
:
true
})
this
.
saveReportStatus
(
data
)
}
else
uni
.
showToast
({
title
:
'操作失败'
,
icon
:
'none'
,
mask
:
true
})
}
else
uni
.
showToast
({
title
:
'操作失败'
,
icon
:
'none'
,
mask
:
true
})
},
saveReportStatus
(
data
)
{
if
(
data
)
...
...
pages/common/dailyNewspaper/mixins.js
View file @
72e5019
...
...
@@ -17,7 +17,9 @@ export default {
type
:
Array
,
default
:
()
=>
[]
},
ReportStatus
:
null
ReportStatus
:
null
,
SubmissionStatus
:
null
,
submissionDate
:[
String
,
Number
]
},
computed
:
{
/**可编辑日期 */
...
...
@@ -31,7 +33,7 @@ export default {
},
reportParams
()
{
let
{
shopMerchantId
,
shopMerchantName
,
uuid
,
name
,
merchantId
,
merchantName
}
=
this
.
userInfo
,
{
currentDate
,
templateType
,
dailyReportRecordId
,
sceneType
}
=
this
,
{
currentDate
,
templateType
,
dailyReportRecordId
,
sceneType
,
SubmissionStatus
,
submissionDate
}
=
this
,
params
=
{
merchantId
:
shopMerchantId
,
merchantName
:
shopMerchantName
,
...
...
@@ -42,8 +44,12 @@ export default {
templateType
:
templateType
(),
yqMerchantId
:
merchantId
,
yqMerchantName
:
merchantName
,
sceneType
sceneType
,
}
if
(
!
SubmissionStatus
)
params
.
submissionStatus
=
2
else
params
.
submissionStatus
=
SubmissionStatus
if
(
!
submissionDate
)
params
.
submissionDate
=
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
else
params
.
submissionDate
=
dayjs
(
submissionDate
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
if
(
dailyReportRecordId
())
params
.
dailyReportRecordId
=
dailyReportRecordId
()
return
params
}
...
...
@@ -76,52 +82,7 @@ export default {
console
.
log
(
error
)
}
},
async
saveReport
(
res
)
{
try
{
uni
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
})
let
{
reportParams
}
=
this
,
list
=
utils
.
deepClone
(
res
)
let
jsonContent
=
JSON
.
stringify
(
list
)
let
requestJson
=
buildAppNormalizedListsFromJsonContent
(
jsonContent
)
list
.
map
(
e
=>
{
let
childrenValue
=
[]
if
(
e
.
children
&&
e
.
children
.
length
)
e
.
children
.
map
((
c
,
cIndex
)
=>
{
let
isArray
=
Array
.
isArray
(
c
)
if
(
isArray
)
{
childrenValue
.
push
({
[
e
.
key
]:
{}
})
c
.
map
(
i
=>
{
let
value
=
i
.
value
if
(
i
[
i
.
key
])
childrenValue
[
cIndex
][
e
.
key
][
i
.
key
]
=
{
text
:
value
,
value
:
i
[
i
.
key
]
}
else
childrenValue
[
cIndex
][
e
.
key
][
i
.
key
]
=
value
})
}
})
e
.
childrenValue
=
childrenValue
if
(
e
.
type
==
'subform'
)
delete
e
.
children
})
reportParams
.
jsonContent
=
JSON
.
stringify
(
list
)
reportParams
.
requestJson
=
JSON
.
stringify
(
requestJson
)
console
.
log
(
'保存草稿'
,
reportParams
)
const
data
=
await
uni
.
$api
.
dailyTemplateApi
.
saveDraft
(
reportParams
)
uni
.
hideLoading
()
if
(
data
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
mask
:
true
})
this
.
$emit
(
'saveReportStatus'
,
data
)
}
else
uni
.
showToast
({
title
:
'操作失败'
,
icon
:
'none'
,
mask
:
true
})
console
.
log
(
data
)
}
catch
(
error
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
icon
:
'none'
,
mask
:
true
})
}
},
async
submitReport
(
res
)
{
async
saveReport
(
res
,
isPush
=
false
)
{
try
{
const
phoneRegex
=
/^1
[
3456789
]\d{9}
$/
uni
.
showLoading
({
title
:
'提交中...'
,
mask
:
true
})
...
...
@@ -194,11 +155,22 @@ export default {
reportParams
.
requestJson
=
JSON
.
stringify
(
requestJson
)
console
.
log
(
'提交日报'
,
reportParams
)
uni
.
hideLoading
()
this
.
$emit
(
'submitReport'
,
reportParams
)
if
(
isPush
)
return
Promise
.
resolve
(
reportParams
)
const
data
=
await
uni
.
$api
.
dailyTemplateApi
.
saveDraft
(
reportParams
)
uni
.
hideLoading
()
if
(
data
)
{
uni
.
showToast
({
title
:
'操作成功'
,
icon
:
'success'
,
mask
:
true
})
this
.
$emit
(
'saveReportStatus'
,
data
)
}
else
uni
.
showToast
({
title
:
'操作失败'
,
icon
:
'none'
,
mask
:
true
})
}
catch
(
error
)
{
console
.
log
(
error
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
icon
:
'none'
,
mask
:
true
})
}
},
async
submitReport
(
res
)
{
let
reportParams
=
await
this
.
saveReport
(
res
,
true
)
this
.
$emit
(
'submitReport'
,
reportParams
)
}
}
}
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