增加日报功能
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user