Commit 31b9f202 by 张立顺

fix bug

1 parent 58ee1774
......@@ -13,7 +13,7 @@
display: flex;
justify-content: space-around;
align-items: center;
border-bottom: 1rpx solid #e4e8ee;
border-top: 0.5rpx solid #e4e8ee;
// box-shadow: 0 var(--fontSize4) var(--fontSize8) 0 #cdcdd159;
}
......
......@@ -13,7 +13,12 @@ Page({
selectWeek: 0, //0代表的本周 1代表下一周 -1代表上一周
role: 'staff',
hasDailyValue: false,
orderObj: {}
orderObj: {},
// textarea 自动增高:起始 76px,最大 200px,超过后滚动
todayAutoHeight: true,
todayHeight: 76,
tomorrowAutoHeight: true,
tomorrowHeight: 76
},
handleConfirm() {
let that = this
......@@ -25,22 +30,32 @@ Page({
todayWorkContent: orderObj.todayWorkContent,
tomorrowPlanContent: orderObj.tomorrowPlanContent
}
dailyReportApi
.staffDailyReportSave(params)
.then(result => {
wx.showModal({
title: '提示',
content: '您的日报填写完成!',
showCancel: false,
confirmText: '我知道了',
confirmColor: '#292D33',
success(res) {
that.setReportDate()
that.getStaffDailyReportDetailWeeklyList()
}
// 都填写了才请求接口
if (orderObj.todayWorkContent && orderObj.tomorrowPlanContent) {
if (orderObj.todayWorkContent.trim().length == 0 || orderObj.tomorrowPlanContent.trim().length == 0) {
return wx.showToast({
title: '日报内容不可为空,请重新输入',
icon: 'none',
})
})
.catch(err => { })
}
dailyReportApi
.staffDailyReportSave(params)
.then(result => {
wx.showModal({
title: '提示',
content: '您的日报填写完成!',
showCancel: false,
confirmText: '我知道了',
confirmColor: '#292D33',
success(res) {
that.setReportDate()
that.getStaffDailyReportDetailWeeklyList()
}
})
})
.catch(err => { })
}
},
formatDateTime(date) {
const year = date.getFullYear()
......@@ -121,6 +136,32 @@ Page({
['orderObj.' + name]: e.detail.value
})
},
// 今日工作 textarea 行数变化时控制高度:超过 200px 固定高度,出现滚动
onTodayLineChange(e) {
const minH = 76
const maxH = 100
const h = Math.round(e.detail.height || 0)
if (this.data.todayAutoHeight) {
if (h >= maxH) {
this.setData({ todayAutoHeight: false, todayHeight: maxH })
} else {
this.setData({ todayHeight: Math.max(minH, h) })
}
}
},
// 明日计划 textarea 行数变化时控制高度:超过 200px 固定高度,出现滚动
onTomorrowLineChange(e) {
const minH = 76
const maxH = 100
const h = Math.round(e.detail.height || 0)
if (this.data.tomorrowAutoHeight) {
if (h >= maxH) {
this.setData({ tomorrowAutoHeight: false, tomorrowHeight: maxH })
} else {
this.setData({ tomorrowHeight: Math.max(minH, h) })
}
}
},
/**
* 选中了某一日,改变selectDay为选中日
*/
......@@ -259,6 +300,7 @@ Page({
},
initData() {
let { orderObj, reportDate, userInfo } = this.data
console.log(reportDate, 'reportDate');
if (reportDate) {
// reportDate = "2024-04-27";
var dateisSunday = new Date(reportDate)
......@@ -281,7 +323,7 @@ Page({
selectWeek: 0 - countSundays,
['timeBean.selectDay']:
dateisSunday.getDay() == 0 ? 6 : dateisSunday.getDay() - 1,
selectWeek: dateisSunday.getDay() === 0 ? -1 : 0
// selectWeek: dateisSunday.getDay() === 0 ? -1 : 0
})
} else {
this.setData({
......
......@@ -13,9 +13,16 @@
display: flex;
justify-content: space-between;
color: #757b85;
font-size: 24rpx;
.staff {
flex: 1;
margin-right: 10rpx;
}
}
.remark_box {
box-sizing: border-box;
padding: var(--fontSize20);
background-color: #fff;
......@@ -33,7 +40,9 @@
padding: var(--fontSize24);
.textarea {
height: var(--fontSize130);
// height: var(--fontSize130);
width: 625rpx;
}
......@@ -58,7 +67,10 @@
}
.content {
width: 650rpx;
margin: 10rpx 20rpx;
// height: auto;
min-height: 200rpx;
// padding: 0 40rpx;
}
}
......@@ -126,9 +138,7 @@
}
.nothing {
padding: var(--fontSize30) 0;
text-align: center;
// font-size: var(--fontSize28);
height: 60vh;
color: #999ea8;
font-size: 24rpx;
display: flex;
......
......@@ -7,7 +7,7 @@
<view class="label">今日工作<text class='required'>*</text></view>
<!-- {{ filter.filterDisabled(role, orderObj.reportDate) ?'disabled':'' }} -->
<view class="textArea_box">
<textarea disabled="{{ filter.filterDisabled(role, orderObj.reportDate) }}" value="{{ orderObj.todayWorkContent }}" maxlength="200" placeholder="请输入" class="textarea" data-name="todayWorkContent" bindinput="remarkInput" />
<textarea auto-height="{{ todayAutoHeight }}" style="height: {{ todayHeight }}px;" disabled="{{ filter.filterDisabled(role, orderObj.reportDate) }}" value="{{ orderObj.todayWorkContent }}" maxlength="200" placeholder="请输入" class="textarea" data-name="todayWorkContent" bindinput="remarkInput" bindlinechange="onTodayLineChange" />
<!-- -->
<view class="currentWordNumber">{{todayWorkContent || 0}} / 200</view>
</view>
......@@ -17,7 +17,7 @@
<!-- {{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' ?'disabled':'' }} -->
<!-- {{ filter.filterDisabled(role, orderObj.reportDate) ?'disabled':'' }} -->
<view class="textArea_box">
<textarea disabled="{{ filter.filterDisabled(role, orderObj.reportDate) }}" value="{{ orderObj.tomorrowPlanContent }}" maxlength="200" placeholder="请输入" class="textarea" data-name="tomorrowPlanContent" bindinput="remarkInput" />
<textarea auto-height="{{ tomorrowAutoHeight }}" style="height: {{ tomorrowHeight }}px;" disabled="{{ filter.filterDisabled(role, orderObj.reportDate) }}" value="{{ orderObj.tomorrowPlanContent }}" maxlength="200" placeholder="请输入" class="textarea" data-name="tomorrowPlanContent" bindinput="remarkInput" bindlinechange="onTomorrowLineChange" />
<!-- disabled="{{ filter.filterDisabled(role, weeklyList, orderObj.reportDate, isEditReport) || role != 'staff' }}" -->
<view class="currentWordNumber">{{tomorrowPlanContent || 0}} / 200</view>
</view>
......@@ -25,18 +25,20 @@
</view>
<view class="textbox read" wx:elif="{{ detailObj }}">
<view class="header">
<view class="staff">填写人:{{detailObj.createdBy}}</view>
<view class="staff text-hide">填写人:{{detailObj.createdBy}}</view>
<view class="time">填写时间:{{detailObj.createdDate}}</view>
</view>
<view class="remark_box">
<view class="label">今日工作:</view>
<view class="content">{{detailObj.todayWorkContent}}</view>
<view class="currentWordNumber">{{todayWorkContent || 0}} / 200</view>
<!-- <view class="content">{{detailObj.todayWorkContent}}</view> -->
<textarea disabled="{{true }}" value="{{ orderObj.todayWorkContent }}" class=" content" />
<!-- <view class="currentWordNumber">{{todayWorkContent || 0}} / 200</view> -->
</view>
<view class="remark_box">
<view class="label">明日计划:</view>
<view class="content">{{detailObj.tomorrowPlanContent}}</view>
<view class="currentWordNumber">{{tomorrowPlanContent || 0}} / 200</view>
<!-- <view class="content">{{detailObj.tomorrowPlanContent}}</view> -->
<textarea disabled="{{true }}" value="{{ orderObj.tomorrowPlanContent }}" class=" content" />
<!-- <view class="currentWordNumber">{{tomorrowPlanContent || 0}} / 200</view> -->
</view>
</view>
<view class="nothing" wx:else>
......
......@@ -2,6 +2,7 @@
Page {
background: #f7f8fa;
padding-bottom: 125rpx;
}
.main {
......
......@@ -15,8 +15,12 @@
// opacity: 1;
background: #ffffff;
box-sizing: border-box;
padding: 30rpx 32rpx;
padding: 30rpx 20rpx;
.headerbar {
box-sizing: border-box;
padding: 0 12rpx;
}
}
.header {
......@@ -65,13 +69,13 @@
.visitRecord {
box-sizing: border-box;
padding: 16rpx 12rpx;
padding: 16rpx 10rpx;
// width: 670rpx;
// height: 244rpx;
border-radius: 12rpx;
opacity: 1;
background: #f7f8fa;
margin: 0 auto;
margin: 0 autorpx;
.time {
display: flex;
......
......@@ -3,6 +3,7 @@
<view class="merchant headerBar">
<view class="title" wx:if="{{userInfo.loginRole !=3}}">我的门店</view>
<view class="tableBox">
<view class="headerbar">
<view class="header">
<view class="left">门店待跟进</view>
<view class="right">
......@@ -28,6 +29,7 @@
<view class="num">{{followUpData.signedHasOrderTotal}}</view>
</view>
</view>
</view>
<view class="visitRecord" wx:if="{{ followUpData.waitFollowShopList[0] }}">
<view class="time">
<glsx-image class="icon" src="/index/clock.png"></glsx-image>
......
......@@ -163,7 +163,7 @@
box-sizing: border-box;
height: var(--fontSize94);
width: var(--fontSize232);
padding: var(--fontSize20) var(--fontSize20);
padding: var(--fontSize0) var(--fontSize20);
font-size: var(--fontSize20);
color: #666666;
// box-shadow: 4px 0 4px -3px #0000000f;
......@@ -171,7 +171,7 @@
}
.table .table-body .th .name .labelName {
height: var(--fontSize58);
height: var(--fontSize62);
box-sizing: border-box;
word-break: break-all;
display: -webkit-box;
......@@ -181,10 +181,12 @@
-webkit-line-clamp: 2;
color: #292d33;
font-size: 24rpx;
margin: 15rpx 15rpx;
}
.table .table-body .th .labelName.oneLine {
line-height: var(--fontSize58);
margin: 17rpx 15rpx;
}
.table .table-body .th .values .td {
......
......@@ -47,7 +47,7 @@
<block wx:for="{{ formattedTable }}" wx:key="index">
<view class="th" style="width: var(--fontSize{{ tableWidth }})">
<view class="name" bind:tap="onTableClick" data-item="{{ item }}">
<view class="labelName {{ item[headerConfig.key].length<=10?'oneLine':'' }}">{{item[headerConfig.key]}}</view>
<view class="labelName {{ item[headerConfig.key].length<=8?'oneLine':'' }}">{{item[headerConfig.key]}}</view>
</view>
<view class="values">
<block wx:for="{{ tableObj }}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
......
......@@ -163,7 +163,7 @@
box-sizing: border-box;
height: var(--fontSize94);
width: var(--fontSize160);
padding: var(--fontSize20) var(--fontSize20);
padding: var(--fontSize0) var(--fontSize20);
font-size: var(--fontSize20);
color: #666666;
box-shadow: 4px 0 4px -3px #0000000f;
......@@ -171,7 +171,7 @@
}
.table .table-body .th .name .labelName {
height: var(--fontSize60);
height: var(--fontSize62);
box-sizing: border-box;
word-break: break-all;
display: -webkit-box;
......@@ -181,10 +181,12 @@
-webkit-line-clamp: 2;
color: #292d33;
font-size: 24rpx;
margin: 15rpx 15rpx;
}
.table .table-body .th .labelName.oneLine {
line-height: var(--fontSize58);
margin: 20rpx 15rpx;
}
.table .table-body .th .values .td {
......
<!-- pages/tab/output/output.wxml -->
<navigation-bar navStyle="{{ navStyle }}" bindnavbarReady="navbarReady">我的账号</navigation-bar>
<navigation-bar navStyle="{{ navStyle }}" bindnavbarReady="navbarReady">个人中心</navigation-bar>
<view class="layout" style="padding-top:{{ tabBarStyle }}px;">
<view class="userInfoCon">
<glsx-image class="headPortrait" src="{{ userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>头像</glsx-image>
<view class="right">
<view class="name">{{userInfo.name}}</view>
<view class="id phone">{{userInfo.phone}}</view>
</view>
<glsx-image class="setting" src="{{ '/personal/setting.png' }}" webp bind:tap="navSetting"></glsx-image>
</view>
<!-- <view class="utilBoxTitle">常用工具</view> -->
<view class="boxItemCon">
<!-- wx:for="{{boxItemList}}" wx:key="index" class="{{item.isHide ? '': 'item'}}" data-path="{{item.path}}" data-item="{{item}}"-->
<view bind:tap="navGOMiniProgram" class="item">
<glsx-image class="img" src="{{ '/personal/posterCard.png' }}" />
<view class="name">我的名片</view>
</view>
<!-- <view class="update" bindtap="jump">
<view class="userInfoCon">
<glsx-image class="headPortrait" src="{{ userInfo.userAvatarUrl||IMAGES.userAvatarUrl }}" webp>头像</glsx-image>
<view class="right">
<view class="name">{{userInfo.name}}</view>
<view class="id phone">{{userInfo.phone}}</view>
</view>
<glsx-image class="setting" src="{{ '/personal/setting.png' }}" webp bind:tap="navSetting"></glsx-image>
</view>
<!-- <view class="utilBoxTitle">常用工具</view> -->
<view class="boxItemCon">
<!-- wx:for="{{boxItemList}}" wx:key="index" class="{{item.isHide ? '': 'item'}}" data-path="{{item.path}}" data-item="{{item}}"-->
<view bind:tap="navGOMiniProgram" class="item">
<glsx-image class="img" src="{{ '/personal/posterCard.png' }}" />
<view class="name">我的名片</view>
</view>
<!-- <view class="update" bindtap="jump">
<view class="icon">
<glsx-image class="logo" webp src="store-assistant/menu/log.png"></glsx-image>
</view>
......@@ -28,11 +28,11 @@
<glsx-image class="logo" webp src="store-assistant/menu/log-arrow.png"></glsx-image>
</view>
</view> -->
</view>
<!-- <button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
</view>
<!-- <button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
退出登录
</button> -->
<!-- <view class="message-box">
<!-- <view class="message-box">
<text catchtap="jump" data-url="privacy">《隐私协议》</text>
和
<text catchtap="jump" data-url="agreement">《用户协议》</text>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!