增加日报功能

This commit is contained in:
浅念
2025-04-11 17:21:39 +08:00
parent ac98840890
commit 1ed077e0db
8 changed files with 307 additions and 3 deletions
+6 -1
View File
@@ -70,6 +70,7 @@ export default {
desc: 'This is template page',
title:'Account',
msg:'Message Notification',
workreport:'daily work report',
cpassword:'Change Password',
contact:'Contact Service',
feedback:'Work order',
@@ -100,7 +101,11 @@ export default {
positioninput:'Please fill in the position',
QRcode:'QR code',
WeChat:'WeChat',
UploadQRcode:'Upload QR code'
UploadQRcode:'Upload QR code',
Reportdate:'Report date',
Presenter:'Presenter',
newcustomernum:"Today's new customer count",
workcontent:"Today's job responsibilities"
},
call:'Call',
delete:'Delete',
+6 -1
View File
@@ -68,6 +68,7 @@ export default {
desc: "мой",
title: "мой",
msg: "Уведомления",
workreport:'Дневник',
cpassword: "Изменить пароль",
contact: "Связаться с поддержкой",
feedback: "Отправить заявку",
@@ -98,7 +99,11 @@ export default {
positioninput: "Введите должность",
QRcode: "QR-код",
WeChat: "Микросхема",
UploadQRcode: "Загрузить QR-код"
UploadQRcode: "Загрузить QR-код",
Reportdate:'Дата представления доклада',
Presenter:'Докладчик',
newcustomernum:"Количество новых клиентов сегодня",
workcontent:"Содержание работы"
},
call: "Позвонить",
delete: "Удалить",
+6 -1
View File
@@ -68,6 +68,7 @@ export default {
desc: '我的',
title:'我的',
msg:'消息通知',
workreport:'工作日报',
cpassword:'修改密码',
contact:'联系客服',
feedback:'提交工单',
@@ -98,7 +99,11 @@ export default {
positioninput:'请填写职位',
QRcode:'二维码',
WeChat:'微信',
UploadQRcode:'上传二维码'
UploadQRcode:'上传二维码',
Reportdate:'汇报日期',
Presenter:'汇报人',
newcustomernum:'今日新客户开发数量',
workcontent:'今日工作内容'
},
call:'呼叫',
delete:'删除',
+18
View File
@@ -248,6 +248,24 @@
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
},
{
"path" : "workreport",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
},
{
"path" : "workreportdetil",
"style" :
{
"navigationBarTitleText" : "",
"enablePullDownRefresh": false,
"navigationStyle":"custom"// 去掉微信小程序顶部导航
}
}
]
}
+5
View File
@@ -33,6 +33,11 @@
<uni-icons type="right" class="icon" size="18"></uni-icons>
</view>
</view> -->
<view class="sonContent" @click="navTo('/pages/mine/workreport')">
<image class="son-img-bg" src="/static/image/mine/icon10.png"></image>
<span>{{$t('mine.workreport')}}</span>
<uni-icons type="right" class="icon" size="18"></uni-icons>
</view>
<view class="sonContent" @click="navTo('/pages/mine/resetPwd')">
<image class="son-img-bg" src="/static/image/mine/icon2.png"></image>
<span>{{$t('mine.cpassword')}}</span>
+100
View File
@@ -0,0 +1,100 @@
<template>
<view>
<z-paging ref="paging" v-model="datalist" @query="queryList" :empty-view-text="$t('Nodata')">
<template #top>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000"
backgroundColor="#fff" :statusBar="true" :title="$t('mine.workreport')"></uni-nav-bar>
</template>
<view class="contents" >
<view class="colls" v-for="(item, index) in datalist" :key="index" @click="godetilfn(item)">
<view class="cont">
<view class=""><text class="name">{{item.user.name}}的工作日报</text></view>
<view class="time">{{item.updated_at}}</view>
<view class="dynamic-ellipsis">今日工作内容:<text>{{item.text}}</text></view>
</view>
</view>
</view>
</z-paging>
</view>
</template>
<script>
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
datalist:[]
}
},
methods: {
leftClick(){
uni.navigateBack({})
},
//客户列表数据
queryList(pageNo, pageSize) {
var that = this;
request({
url:'daily/list',
method:'get',
data: {
page:pageNo,
per_page:10,
}
}).then(res => {
console.log(res.data)
if(res.data.code ==0){
var datas = res.data.data.data;
this.$refs.paging.complete(datas);
}else{
}
uni.stopPullDownRefresh();
})
},
godetilfn(item){
var that=this
uni.navigateTo({
url: '/pages/mine/workreportdetil?id='+item.id
});
}
}
}
</script>
<style lang="scss">
.contents{
background-color: #FFFFFF;
padding: 15px;
.colls{
background: #F6F6F6;
border-radius: 10px;
margin-bottom: 10px;
}
.top{
padding: 10px 15px 0px;
display: flex;
align-items: center;
justify-content: space-between;
}
.name{
font-size: 32rpx;
font-weight: bold;
margin-right: 10px;
}
.cont{
padding: 15px 12px;
font-size: 28rpx;
.time{
color: #999999;
font-size: 24rpx;
}
}
.dynamic-ellipsis {
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
}
}
</style>
+166
View File
@@ -0,0 +1,166 @@
<template>
<view>
<uni-nav-bar leftText=" " :fixed="true" :border="false" leftIcon="back" @clickLeft="leftClick" color="#000000" backgroundColor="#fff" :statusBar="true" :title="$t('mine.workreport')"></uni-nav-bar>
<view class="content">
<view class="cell1">
<view >{{$t('mine.Reportdate')}}</view>
<view class="right">
<input :placeholder="$t('mine.nicknameinputhd')" v-model="userinfo.updated_at" disabled></input>
</view>
</view>
<u-divider text=""></u-divider>
<view class="cell1">
<view >{{$t('mine.Presenter')}}</view>
<view class="right">
<input type="text" v-model="userinfo.user.name" disabled></input>
</view>
</view>
<!-- <u-divider text=""></u-divider>
<view class="cell1">
<view >{{$t('mine.newcustomernum')}}</view>
<view class="right">
<input type="number" v-model="userinfo.follow"></input>
</view>
</view> -->
<u-divider text=""></u-divider>
<view class="cell">
<view>{{$t('mine.workcontent')}}</view>
<view class="yuyin">
<textarea auto-height :placeholder="$t('mine.workcontent')" v-model="userinfo.text"/>
</view>
</view>
<view class="cell">
<view>{{$t('customer.Remarks')}}</view>
<view class="yuyin">
<textarea auto-height :placeholder="$t('customer.Remarksinputhd')" v-model="userinfo.remark"/>
</view>
</view>
</view>
<view class="foot" v-if="userinfo.self==0">
<button class="btn" @click="bcFn">{{$t('submit')}}</button>
</view>
</view>
</template>
<script>
import { nextTick } from "vue"
import { request,showToast } from '@/api/apiT.js'
export default {
data() {
return {
id:'',
userinfo:{},
}
},
onLoad(options) {
this.id = options.id;
this.getinfo()
},
methods: {
// 搜索处理函数
getinfo(){
var that= this;
request({
url:'daily/detail',
method:'get',
data: {
id:this.id,
}
}).then(res => {
that.userinfo = res.data.data
})
},
leftClick(){
uni.navigateBack({})
},
bcFn(){
console.log(this.userinfo)
request({
url:'daily/save',
method:'POST',
data:{
id:this.id,
text:this.userinfo.text,
remark:this.userinfo.remark,
}
}).then(res => {
uni.showToast({
title: res.data.message,
icon: 'none'
});
if(res.data.code ==0){
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/mine',// 替换为你要跳转的页面路径
});
}, 1000);
}
})
}
}
}
</script>
<style lang="scss">
textarea {
min-height: 200rpx;// 设置默认高度 ,解决设置自适应高度之后高度无效问题
margin-top: 15px;
background-color: #F6F6F6;
padding: 15px;
border-radius: 10px;
}
.m-r-10{
margin-right: 10px;
}
.u-divider{
margin: 0px 0px !important;
}
.content{
background: #FFFFFF;
padding-bottom: 100px;
.user{
width: 200rpx;
height: 200rpx;
}
.xj{
width: 60rpx;
height: 52rpx;
position: absolute;
right: 46%;
top: 33%;
}
}
.cell1{
display: flex;
justify-content:space-between;
padding: 18px 20px;
align-items: center;
font-weight: 500;
.item{
width: 90px;
}
}
.cell{
padding: 18px 20px;
font-weight: 500;
}
.right{
text-align: right;
}
.foot{
position: fixed;
bottom: 0px;
width: 100%;
height: 160rpx;
background: #FFFFFF;
}
.btn{
background: linear-gradient(to right, #3471FF, #6776FF);
color: white;
border-radius: 50px;
width: 84%;
margin: 20px 8%;
font-size: 32rpx;
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B