Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zc-qiyewx-app
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
杨勇飞
zc-qiyewx-app
Commits
3612bc13
Commit
3612bc13
authored
Feb 21, 2025
by
刘杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业微信前端
parent
512b328a
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
462 additions
and
359 deletions
+462
-359
apiList.js
api/apiList.js
+7
-0
bossCard.vue
components/bossCard/bossCard.vue
+17
-5
dailyReport.vue
components/dailyReport/dailyReport.vue
+57
-32
dailyReportCreate.vue
components/dailyReportCreate/dailyReportCreate.vue
+46
-16
manifest.json
manifest.json
+9
-9
index.vue
pages/abnormal/list/index.vue
+282
-262
index.vue
pages/index/index.vue
+42
-33
config.js
publicConfig/config.js
+2
-2
No files found.
api/apiList.js
View file @
3612bc13
...
...
@@ -9,9 +9,13 @@ import {
}
from
"../publicConfig/config"
;
export
function
searchBossCard
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.tm.OrderRelease.service.searchBossCard`
,
data
)
}
export
function
searchOrderEvent
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.tm.OrderRelease.service.searchOrderEvent`
,
data
)
}
export
function
BindCompany
(
data
)
{
return
Request
(
...
...
@@ -26,6 +30,9 @@ export function selectDailyReport(data) {
export
function
dailyReportSave
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.zcgyl.DailyReport.service.auxVoSave`
,
data
)
}
export
function
selectReporter
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.zcgyl.DailyReport.service.selectReporter`
,
data
)
}
export
function
selectStaffByUsername
(
data
)
{
return
Request
(
`/api/entry/{mini}/m-action/biz.zcgyl.DailyReport.service.selectStaffByUsername`
,
data
)
...
...
components/bossCard/bossCard.vue
View file @
3612bc13
...
...
@@ -377,7 +377,7 @@
methods
:
{
async
initData
()
{
this
.
staffCode
=
uni
.
getStorageSync
(
`staffCode`
);
this
.
staffKind
=
uni
.
getStorageSync
(
'uc_staff_kind'
);
const
data
=
{
"aux"
:
{
"activeTime"
:
this
.
activeTime
,
...
...
@@ -706,7 +706,10 @@
if
(
chart
===
'myLeaderChart'
)
{
this
.
myLeaderChart
.
setOption
({
xAxis
:
{
data
:
sortArray
.
map
(
item
=>
item
.
name
)
data
:
sortArray
.
map
(
item
=>
item
.
name
),
axisLabel
:
{
rotate
:
-
20
// 设置横坐标标签旋转 45°
}
},
series
:
[{
name
:
'应收'
,
...
...
@@ -722,7 +725,10 @@
}
else
if
(
chart
===
'myProjectChart'
)
{
this
.
myProjectChart
.
setOption
({
xAxis
:
{
data
:
sortArray
.
map
(
item
=>
item
.
name
)
data
:
sortArray
.
map
(
item
=>
item
.
name
),
axisLabel
:
{
rotate
:
-
20
// 设置横坐标标签旋转 45°
}
},
series
:
[{
name
:
'应收'
,
...
...
@@ -767,7 +773,10 @@
if
(
chart
===
'myLeaderChart'
)
{
this
.
myLeaderChart
.
setOption
({
xAxis
:
{
data
:
sortArray
.
map
(
item
=>
item
.
name
)
data
:
sortArray
.
map
(
item
=>
item
.
name
),
axisLabel
:
{
rotate
:
-
20
// 设置横坐标标签旋转 45°
}
},
series
:
[{
name
:
'应收'
,
...
...
@@ -783,7 +792,10 @@
}
else
if
(
chart
===
'myProjectChart'
)
{
this
.
myProjectChart
.
setOption
({
xAxis
:
{
data
:
sortArray
.
map
(
item
=>
item
.
name
)
data
:
sortArray
.
map
(
item
=>
item
.
name
),
axisLabel
:
{
rotate
:
-
20
// 设置横坐标标签旋转 45°
}
},
series
:
[{
name
:
'应收'
,
...
...
components/dailyReport/dailyReport.vue
View file @
3612bc13
...
...
@@ -2,15 +2,15 @@
<view
class=
"daily-report"
>
<!-- 顶部统计 -->
<view
class=
"report-stats"
>
<view
class=
"stat-item"
>
<view
class=
"stat-item"
@
click=
"selectReport('submit')"
>
<text
class=
"number"
style=
"color: #52c41a;"
>
{{
searchDatas
.
submitted
}}
</text>
<text
class=
"label"
>
已提交
</text>
</view>
<view
class=
"stat-item"
>
<view
class=
"stat-item"
@
click=
"selectReport('unSubmit')"
>
<text
class=
"number"
style=
"color: #ff4d4f;"
>
{{
searchDatas
.
unSubmitted
}}
</text>
<text
class=
"label"
>
未提交
</text>
</view>
<view
class=
"stat-item"
>
<view
class=
"stat-item"
@
click=
"selectReport('all')"
>
<text
class=
"number"
style=
"color: #1890ff;"
>
{{
searchDatas
.
total
}}
</text>
<text
class=
"label"
>
总人数
</text>
</view>
...
...
@@ -19,7 +19,7 @@
<!-- 日报列表 -->
<scroll-view
class=
"report-list"
scroll-y
:style=
"
{ height: 'calc(100vh - 120px)' }">
<view
class=
"report-card"
v-for=
"(report, index) in
searchDatas.
dailyReportList"
:key=
"index"
>
<view
class=
"report-card"
v-for=
"(report, index) in dailyReportList"
:key=
"index"
>
<view
class=
"card-header"
>
<view
class=
"left"
>
<text
class=
"name"
>
{{
report
.
reporter
}}
</text>
...
...
@@ -58,10 +58,13 @@
export
default
{
data
()
{
return
{
searchStatus
:
"all"
,
staffCode
:
""
,
staffKind
:
""
,
searchDatas
:
{},
commonName
:
""
,
dailyReportList
:
[]
}
},
mounted
()
{
...
...
@@ -72,30 +75,53 @@
this
.
onReload
()
},
methods
:
{
selectReport
(
status
)
{
this
.
searchStatus
=
status
this
.
dailyReportList
=
[]
this
.
initData
()
},
initData
()
{
this
.
staffCode
=
uni
.
getStorageSync
(
`staffCode`
);
this
.
staffKind
=
uni
.
getStorageSync
(
`uc_staff_kind`
);
this
.
staffCode
=
uni
.
getStorageSync
(
'staffCode'
);
this
.
staffKind
=
uni
.
getStorageSync
(
'uc_staff_kind'
);
this
.
commonName
=
uni
.
getStorageSync
(
'commonName'
);
console
.
log
(
'获取到的commonName:'
,
this
.
commonName
);
if
(
!
this
.
staffCode
||
!
this
.
staffKind
)
{
uni
.
showToast
({
title
:
'获取用户信息失败'
,
icon
:
'none'
});
return
;
}
const
data
=
{
"aux"
:
{
"staffCode"
:
this
.
staffCode
,
"staffKind"
:
this
.
staffKind
aux
:
{
staffCode
:
this
.
staffCode
,
staffKind
:
this
.
staffKind
,
searchStatus
:
this
.
searchStatus
}
}
uni
.
showLoading
({
title
:
'加载中...'
,
});
selectDailyReport
(
data
).
then
(
res
=>
{
uni
.
showLoading
({
title
:
'加载中...'
,
uni
.
stopPullDownRefresh
();
const
data
=
res
.
data
.
data
;
this
.
searchDatas
=
data
;
this
.
dailyReportList
=
this
.
searchDatas
.
dailyReportList
}).
catch
(
err
=>
{
console
.
error
(
'获取日报数据失败:'
,
err
);
uni
.
showToast
({
title
:
'获取数据失败'
,
icon
:
'none'
});
uni
.
stopPullDownRefresh
()
const
data
=
res
.
data
.
data
this
.
searchDatas
=
data
setTimeout
(
function
()
{
uni
.
hideLoading
();
},
100
);
})
}).
finally
(()
=>
{
uni
.
hideLoading
();
});
},
onReload
()
{
...
...
@@ -125,6 +151,15 @@
padding
:
15px
24px
;
background
:
#f9f9f9
;
border-radius
:
6px
;
transition
:
background
0
.3s
,
transform
0
.3s
;
/* 添加过渡效果 */
&
:hover
{
background
:
#e6f7ff
;
/* 鼠标悬停时的背景色 */
transform
:
scale
(
1
.05
);
/* 鼠标悬停时的放大效果 */
}
.number
{
display
:
block
;
...
...
@@ -132,16 +167,6 @@
font-weight
:
bold
;
color
:
#333
;
margin-bottom
:
8px
;
&
:after
{
content
:
''
;
display
:
block
;
width
:
24px
;
height
:
2px
;
background
:
#1890ff
;
margin
:
8px
auto
0
;
border-radius
:
1px
;
}
}
.label
{
...
...
components/dailyReportCreate/dailyReportCreate.vue
View file @
3612bc13
...
...
@@ -8,9 +8,10 @@
<view
class=
"form-container"
>
<!-- 报告人 -->
<view
class=
"form-item"
>
<text
class=
"label"
><text
class=
"label-line"
></text>
报告人
</text>
<input
type=
"text"
v-model=
"formData.reporter"
placeholder=
"请输入报告人"
class=
"input"
:disabled=
"!!formData.reporter"
:style=
"formData.reporter ? 'background-color: #f5f5f5;' : ''"
/>
<text
class=
"label"
><text
class=
"label-line"
></text>
汇报人
</text>
<picker
mode=
"selector"
:range=
"reporterValues"
@
change=
"onReporterChange"
class=
"picker"
>
<view
class=
"picker-text"
>
{{
selectedReporterValue
||
'请选择汇报人'
}}
</view>
</picker>
</view>
<!-- 日期 -->
...
...
@@ -60,7 +61,8 @@
<
script
>
import
{
dailyReportSave
dailyReportSave
,
selectReporter
}
from
'../../api/apiList'
export
default
{
data
()
{
...
...
@@ -76,6 +78,7 @@
return
{
formData
:
{
reporterTo
:
''
,
reporter
:
''
,
date
:
formattedDate
,
// 使用带时间的日期格式
todayWork
:
''
,
...
...
@@ -84,12 +87,15 @@
leaveReason
:
''
},
staffCode
:
""
,
leaveOptions
:
[
'是'
,
'否'
]
staffKind
:
""
,
leaveOptions
:
[
'是'
,
'否'
],
reporterMap
:
{},
// key:value 形式的 map 数据
reporterValues
:
[],
// 用于 picker 的显示值
selectedReporterValue
:
''
// 选中的报告人显示值
}
},
created
()
{
// 在组件创建时获取 commonName
this
.
getCommonName
();
this
.
initReporter
();
// 在组件创建时初始化报告人
},
mounted
()
{
// 如果 created 中没有获取到,在 mounted 中再次尝试
...
...
@@ -98,6 +104,24 @@
}
},
methods
:
{
initReporter
()
{
this
.
staffKind
=
uni
.
getStorageSync
(
'uc_staff_kind'
);
const
data
=
{
"aux"
:{
staffKind
:
this
.
staffKind
}
}
selectReporter
(
data
).
then
(
res
=>
{
const
data
=
res
.
data
.
data
;
// 假设返回的数据在这个路径
this
.
reporterMap
=
{};
// 清空之前的数据
this
.
reporterValues
=
data
.
map
(
item
=>
{
this
.
reporterMap
[
item
.
staffId
]
=
item
.
mame
;
// 将 staffId 作为 key,mame 作为 value
return
item
.
mame
;
// 返回 mame 作为下拉框的显示值
});
}).
catch
(
err
=>
{
console
.
error
(
'获取报告人失败:'
,
err
);
});
},
getCommonName
()
{
const
commonName
=
uni
.
getStorageSync
(
'commonName'
);
console
.
log
(
'获取到的commonName:'
,
commonName
);
...
...
@@ -111,11 +135,16 @@
});
}
},
onReporterChange
(
e
)
{
const
selectedIndex
=
e
.
detail
.
value
;
// 获取选择的索引
this
.
selectedReporterValue
=
this
.
reporterValues
[
selectedIndex
];
// 显示的值
// 获取对应的 key
this
.
formData
.
reporterTo
=
Object
.
keys
(
this
.
reporterMap
)[
selectedIndex
];
// 存储的值为 key
},
dateChange
(
e
)
{
// 当用户选择新日期时,保留当前时间
const
selectedDate
=
e
.
detail
.
value
const
currentTime
=
this
.
formData
.
date
.
split
(
' '
)[
1
]
||
'00:00:00'
this
.
formData
.
date
=
`
${
selectedDate
}
${
currentTime
}
`
const
selectedDate
=
e
.
detail
.
value
;
const
currentTime
=
this
.
formData
.
date
.
split
(
' '
)[
1
]
||
'00:00:00'
;
this
.
formData
.
date
=
`
${
selectedDate
}
${
currentTime
}
`
;
},
leaveChange
(
e
)
{
this
.
formData
.
isLeave
=
this
.
leaveOptions
[
e
.
detail
.
value
]
...
...
@@ -145,6 +174,7 @@
const
data
=
{
"aux"
:
{
reporter
:
this
.
formData
.
reporter
,
reporterTo
:
this
.
formData
.
reporterTo
,
date
:
this
.
formData
.
date
,
todayWork
:
this
.
formData
.
todayWork
,
weekWork
:
this
.
formData
.
weekWork
,
...
...
@@ -161,11 +191,11 @@
title
:
'保存成功'
,
icon
:
'success'
,
duration
:
2000
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
navigateBack
()
},
1500
)
// 等待提示显示 1.5 秒后返回
}
//
success: () => {
//
setTimeout(() => {
//
uni.navigateBack()
//
}, 1500) // 等待提示显示 1.5 秒后返回
//
}
})
}
})
...
...
manifest.json
View file @
3612bc13
...
...
@@ -79,32 +79,32 @@
"devServer"
:
{
"https"
:
false
,
"disableHostCheck"
:
true
,
"port"
:
808
9
,
"port"
:
808
2
,
"proxy"
:
{
"/api"
:
{
"target"
:
"http://122.112.220.204:8089"
,
//
"target"
:
"http://localhost:8083"
,
//
"target"
:
"http://122.112.220.204:8089"
,
"target"
:
"http://localhost:8083"
,
//
"target"
:
"https://stms.bjzc-scs.com"
,
"changeOrigin"
:
true
,
"secure"
:
false
},
"/handler"
:
{
"target"
:
"http://122.112.220.204:8089"
,
//
"target"
:
"http://localhost:8083"
,
//
"target"
:
"http://122.112.220.204:8089"
,
"target"
:
"http://localhost:8083"
,
//
"target"
:
"https://stms.bjzc-scs.com"
,
"changeOrigin"
:
true
,
"secure"
:
false
},
"/sandtable"
:
{
"target"
:
"http://122.112.220.204:8089"
,
//
"target"
:
"http://localhost:8083"
,
//
"target"
:
"http://122.112.220.204:8089"
,
"target"
:
"http://localhost:8083"
,
//
"target"
:
"https://stms.bjzc-scs.com"
,
"changeOrigin"
:
true
,
"secure"
:
false
},
"/tmsca"
:
{
"target"
:
"http://122.112.220.204:8089"
,
//
"target"
:
"http://localhost:8083"
,
//
"target"
:
"http://122.112.220.204:8089"
,
"target"
:
"http://localhost:8083"
,
//
"target"
:
"https://stms.bjzc-scs.com"
,
"changeOrigin"
:
true
,
"secure"
:
false
...
...
pages/abnormal/list/index.vue
View file @
3612bc13
This diff is collapsed.
Click to expand it.
pages/index/index.vue
View file @
3612bc13
...
...
@@ -74,40 +74,40 @@
updateTopUserList
()
{
if
(
this
.
uc_staff_kind
===
'boss'
)
{
this
.
topUserList
=
[{
name
:
'订单查询'
,
key
:
'orderQuery'
,
url
:
'/pages/index/index'
},
{
name
:
'查看日报'
,
key
:
'dailyReport'
,
url
:
'/pages/index/index'
},
{
name
:
'老板看板'
,
key
:
'bossCard'
,
url
:
'/pages/index/index'
},
];
name
:
'订单查询'
,
key
:
'orderQuery'
,
url
:
'/pages/index/index'
},
{
name
:
'查看日报'
,
key
:
'dailyReport'
,
url
:
'/pages/index/index'
},
{
name
:
'老板看板'
,
key
:
'bossCard'
,
url
:
'/pages/index/index'
},
];
}
else
{
this
.
topUserList
=
[{
name
:
'订单查询'
,
key
:
'orderQuery'
,
url
:
'/pages/index/index'
},
{
name
:
'查看日报'
,
key
:
'dailyReport'
,
url
:
'/pages/index/index'
},
{
name
:
'填写日报'
,
key
:
'dailyReportCreate'
,
url
:
'/pages/index/index'
},
{
name
:
'老板看板'
,
key
:
'bossCard'
,
url
:
'/pages/index/index'
},
];
name
:
'订单查询'
,
key
:
'orderQuery'
,
url
:
'/pages/index/index'
},
{
name
:
'查看日报'
,
key
:
'dailyReport'
,
url
:
'/pages/index/index'
},
{
name
:
'填写日报'
,
key
:
'dailyReportCreate'
,
url
:
'/pages/index/index'
},
{
name
:
'老板看板'
,
key
:
'bossCard'
,
url
:
'/pages/index/index'
},
];
}
},
...
...
@@ -174,7 +174,16 @@
this
.
uc_staff_kind
=
data2
.
uc_staff_kind
uni
.
setStorageSync
(
`uc_staff_kind`
,
data2
.
uc_staff_kind
);
this
.
updateTopUserList
();
})
}).
catch
(
err
=>
{
// console.error('获取员工数据失败:', err);
uni
.
showToast
({
title
:
"获取员工数据失败"
,
icon
:
'none'
});
uni
.
redirectTo
({
url
:
"/pages/login/login"
,
})
});
// if (this.isCarrier) {
// this.currentShow = "waybillQuery"
...
...
publicConfig/config.js
View file @
3612bc13
...
...
@@ -9,8 +9,8 @@ let BASEURL = {
// url: 'http://192.168.1.199:7080' //唐浩然
// url: 'http://192.168.0.230:8080' // xiaohan
// url: "https://botms-demo.logwirecloud.com",
//
url: "http://localhost:8083", //开发
url
:
"http://122.112.220.204:8089"
,
//开发
url
:
"http://localhost:8083"
,
//开发
// url: "http://122.112.220.204:8089", //开发/
// url: "https://stms.bjzc-scs.com", //生产
};
...
...
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