Commit 5a5bb312 by zhangxw

日报页面样式修改需求开发

1 parent 5c111b8a
......@@ -52,6 +52,7 @@ var filterIncludes = function(item, arr) {
}
var filterDisabled = function(role, weeklyList, date, disabledStatus) {
console.log(role, weeklyList)
if (role == 'staff') { // 员工七天内可操作
return (weeklyList.indexOf(date) > -1 && !disabledStatus) || !isDateWithin7Days(date)
} else if (role == 'super') { // 超管60天内可操作
......
// tabWorkOrder/pages/staffDaily/components/selectItemPopup/selectItemPopup.js
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean
},
title: {
type: String
},
optionList: {
type: Array
},
index: {
type: Number
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
click(e) {
let { pidx, idx } = e.currentTarget.dataset
this.triggerEvent('click', {pidx, idx})
},
confirm() {
this.triggerEvent('confirm')
},
cancel() {
this.triggerEvent('cancel')
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* tabWorkOrder/pages/staffDaily/components/selectItemPopup/selectItemPopup.wxss */
.check-block {
display: flex;
flex-wrap: wrap;
padding: var(--fontSize24) 0;
.check-box {
position: relative;
box-sizing: border-box;
width: calc((100% - var(--fontSize40)) / 3);
height: var(--fontSize64);
line-height: var(--fontSize64);
text-align: center;
// background: #F7F7F7;
font-size: var(--fontSize24);
// color: #666666;
color: #292D33;
margin-right: var(--fontSize16);
background: #F7F8FA;
border-radius: var(--fontSize4);
}
.check-box.active {
background: #347BFF14;
border: var(--fontSize2) solid #347BFF;
color: #347BFF;
font-family: PingFangSC-Medium;
font-weight: 500;
line-height: var(--fontSize60);
.mult {
position: absolute;
bottom: 0;
right: 0;
width: var(--fontSize20);
height: var(--fontSize20);
}
}
.check-box:nth-child(n+3) {
margin-right: 0;
}
.check-box:nth-child(n+4) {
margin-top: var(--fontSize10);
}
}
\ No newline at end of file
<!--tabWorkOrder/pages/staffDaily/components/selectItemPopup/selectItemPopup.wxml-->
<popup class="date-background" popup-slot-class="popup-style" show="{{ show }}" bindcancel="cancel" bindconfirm="confirm" height="var(--fontSize500)" title="{{title}}">
<view class="check-block">
<view
class="check-box {{ subItem.active ? 'active' : '' }}"
wx:for="{{ optionList }}"
wx:for-item="subItem"
wx:for-index="idx"
wx:key="idx"
bindtap="click"
data-pidx="{{ index }}"
data-idx="{{ idx }}"
>
{{subItem.confName}}
<image wx:if="{{ subItem.active }}" class="mult" src="../../../../images/check-active.png"></image>
</view>
</view>
</popup>
\ No newline at end of file
......@@ -2,58 +2,89 @@
/* compoents/weekCalendar/weekCalendar.wxss */
.row {
display: flex;
flex-direction: row;
flex-direction: column;
justify-content: space-around;
align-items: center;
background: #fff;
.week_box{
height: var(--fontSize60);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
box-shadow: 0 var(--fontSize4) var(--fontSize8) 0 #cdcdd159;
}
.date_box{
height: var(--fontSize128);
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
}
.weekselect {
height: var(--fontSize80);
flex-direction: row;
justify-content: space-between;
}
.column {
display: flex;
flex-direction: column;
flex-flow: column;
align-items: center;
justify-content: center;
padding-bottom: var(--fontSize5);
padding-top: var(--fontSize5);
margin-top: var(--fontSize10);
flex: 1;
}
.nextWeek {
font-family: PingFangSC-Regular;
font-weight: 400;
// font-size: var(--fontSize28);
flex-direction: row;
color: #181A1F;
width: var(--fontSize180);
}
.lastWeek {
font-family: PingFangSC-Regular;
font-weight: 400;
.dateType {
position: relative;
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize32);
color: #292D33;
border-radius: 50%;
width: var(--fontSize64);
height: var(--fontSize64);
.empty {
box-sizing: border-box;
position: absolute;
width: var(--fontSize38);
text-align: center;
height: var(--fontSize32);
background: #F24724;
border-radius: var(--fontSize16);
bottom: var(--fontSize40);
left: var(--fontSize40);
font-size: var(--fontSize22);
z-index: 2;
padding: 0 var(--fontSize4);
color: #fff;
}
}
.dateType.dateType_disabled{
color: #BEC1C7;
}
.weekType {
font-size: var(--fontSize28);
color: #181A1F;
color: #292D33;
}
.select-column {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-bottom: var(--fontSize5);
padding-top: var(--fontSize5);
margin-left: var(--fontSize5);
margin-right: var(--fontSize5);
margin-top: var(--fontSize10);
flex: 1;
border-top-left-radius: var(--fontSize20);
border-top-right-radius: var(--fontSize20);
background: #347BFF;
color: #fff;
.dateType{
background: #347BFF;
color: #fff;
}
}
.disabled {
......@@ -83,18 +114,6 @@
// margin-right: auto;
}
.dateType {
font-size: var(--fontSize35);
font-weight: bold;
}
.weekType {
font-size: var(--fontSize28);
color: darkgrey;
}
.line {
height: var(--fontSize1);
width: 100%;
......@@ -103,6 +122,11 @@
.lastweek {
width: var(--fontSize180);
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: var(--fontSize28);
flex-direction: row;
color: #181A1F;
}
.line-shadow {
......@@ -133,23 +157,6 @@
-moz-osx-font-smoothing: grayscale;
}
.item {
position: relative;
}
.empty {
box-sizing: border-box;
position: absolute;
border-radius: var(--fontSize22);
top: var(--fontSize35);
right: var(--fontSize7);
font-size: var(--fontSize22);
z-index: 2;
padding: 0 var(--fontSize4);
background-color: red;
color: #fff;
}
/**
*字体图标,左右箭头,书,米饭,可以修改界面对图标进行修改替换
*/
......
......@@ -15,13 +15,21 @@
</view>
</view>
<view class="row">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item {{ index==timeBean.selectDay?'select-column':'column' }} {{ timeBean.weekDayList[index].disabled?'disabled':'' }}" bindtap="itemClick" wx:key="index">
<view class="weekType">{{timeBean.weekDayList[index].week}}</view>
<view class="dateType">{{timeBean.weekDayList[index].day}}</view>
<text class="empty" wx:if="{{ !timeBean.weekDayList[index].disabled && !timeBean.weekDayList[index].hasDailyValue }}">空</text>
<view class="week_box">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item column" bindtap="itemClick" wx:key="index">
<view class="weekType">{{timeBean.weekDayList[index].week}}</view>
</view>
</view>
<view class="date_box">
<view wx:for="{{ [0,1,2,3,4,5,6] }}" data-index="{{ index }}" data-disabled="{{ timeBean.weekDayList[index].disabled }}" class="item column {{ index==timeBean.selectDay?'select-column':'' }}" bindtap="itemClick" wx:key="index">
<view class="dateType {{timeBean.weekDayList[index].disabled ? 'dateType_disabled' : ''}}">
{{timeBean.weekDayList[index].day}}
<view class="empty" wx:if="{{ !timeBean.weekDayList[index].disabled && !timeBean.weekDayList[index].hasDailyValue }}">空</view>
</view>
</view>
</view>
</view>
<view class="line-shadow"></view>
<!-- <view class="line-shadow"></view> -->
<view class="suspension" bindtap="addMenuClick">
<text class="iconfont icon-tianjia" style="font-size:var(--fontSize60); color:#fff;"></text>
</view>
\ No newline at end of file
......@@ -28,6 +28,7 @@ export const formData = [
isMult: true,
name: 'trafficProblemList',
optionList: trafficProblemList,
selectedList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'trafficProblemList'
......@@ -37,6 +38,7 @@ export const formData = [
isMult: true,
name: 'skillProblemList',
optionList: skillProblemList,
selectedList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'skillProblemList'
......@@ -46,6 +48,7 @@ export const formData = [
isMult: true,
name: 'packageProblemList',
optionList: packageProblemList,
selectedList: [],
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'packageProblemList'
......
......@@ -12,6 +12,7 @@ let toastList = {
afterSaleEquityToShopCount: '售后到店流量(会员权益/延保)不能为空',
}
const app = getApp()
let programeFlag = false
Page({
/**
* 页面的初始数据
......@@ -197,6 +198,7 @@ Page({
})
},
submit() {
if (programeFlag) return
// 根据不同身份确定提交的数据
let { role, approvedSource, orderObj, formData } = this.data
// 是督导和老板,提交评论
......@@ -242,6 +244,9 @@ Page({
if (code == 0) {
this.getStaffDailyReportDetailWeeklyList()
// wx.$util.showToast('提交成功')
this.setData({
isEditReport: false
})
wx.showModal({
title: '提示',
content: '提交成功',
......@@ -266,12 +271,7 @@ Page({
})
},
click(e) {
role != 'staff'
let { role, orderObj } = this.data
if (role != 'staff' || !orderObj.isDateWithin7Days) return
let { pidx, idx } = e.currentTarget.dataset
let { pidx, idx } = e.detail
this.setData({
[`formData[${pidx}].optionList[${idx}].active`]: !this.data.formData[pidx].optionList[idx].active
})
......@@ -349,7 +349,8 @@ Page({
var m = time.getMonth() + 1
this.setData({
['timeBean.yearMonth']: y + '-' + m,
['orderObj.reportDate']: date
['orderObj.reportDate']: date,
isEditReport: false
})
},
getStaffDailyReportDetailWeeklyList() {
......@@ -382,61 +383,69 @@ Page({
currentWordNumber: 0 // 清空备注字数
})
// console.log({ yqMerchantId, merchantId, staffUuid, reportDate }, 'getStaffReport');
this.setData({
currentWordNumber: 0
})
merchantId && api.staffDailyReportDetail({ yqMerchantId, merchantId, staffUuid, reportDate, sceneType: 0 }).then(res => {
let { code, data, message } = res
// console.log(data, 'data')
if (code == 0) {
let { trafficProblemList, skillProblemList, packageProblemList, deliveryCount, equityToShopCount, afterSaleEquityToShopCount, remark } = data
// trafficProblemList = [1, 2]
// if (trafficProblemList) {
trafficProblemList = trafficProblemList || []
formData.forEach(element => {
if (element.name == 'trafficProblemList') {
element.selectedList = []
element.selectedStr = ''
element.optionList = element.optionList.map(option => {
option.active = false
trafficProblemList.map(item => {
if (option.confId == item) {
option.active = true
element.selectedList.push(option)
}
})
return option
})
element.selectedStr = element.selectedList?.map(v => { return v.confName })?.join(';')
return element
}
})
// }
// if (packageProblemList) {
packageProblemList = packageProblemList || []
skillProblemList = skillProblemList || []
formData.forEach(element => {
if (element.name == 'packageProblemList') {
if (element.name == 'skillProblemList') {
element.selectedList = []
element.selectedStr = ''
element.optionList = element.optionList.map(option => {
option.active = false
packageProblemList.map(item => {
skillProblemList.map(item => {
if (option.confId == item) {
option.active = true
element.selectedList.push(option)
}
})
element.selectedStr = element.selectedList?.map(v => { return v.confName })?.join(';')
return option
})
}
})
// }
// if (skillProblemList) {
skillProblemList = skillProblemList || []
packageProblemList = packageProblemList || []
formData.forEach(element => {
if (element.name == 'skillProblemList') {
if (element.name == 'packageProblemList') {
element.selectedList = []
element.selectedStr = ''
element.optionList = element.optionList.map(option => {
option.active = false
skillProblemList.map(item => {
packageProblemList.map(item => {
if (option.confId == item) {
option.active = true
element.selectedList.push(option)
}
})
element.selectedStr = element.selectedList?.map(v => { return v.confName })?.join(';')
return option
})
}
})
// }
data.approvalList = data.approvalList.map(item => {
let date = new Date(item.createdDate)
// 获取年份、月份和日期
......@@ -463,6 +472,62 @@ Page({
}
})
},
editReport() {
this.setData({
isEditReport: true
})
},
cancelReport() {
this.setData({
isEditReport: false
})
},
// 问题选择
handleProblemPicker(e) {
let { index, label, disabled } = e.currentTarget.dataset
console.log(disabled)
if (disabled) return
this.setData({
selectItemTitle: label,
selectItemIndex: index,
showSelectItemPopup: true
})
},
// 问题选择确定
changePromble(e) {
if (programeFlag) return
programeFlag = true
let { formData } = this.data
formData?.forEach(val => {
val.selectedList = []
val?.optionList?.forEach(subVal => {
if (subVal.active) val.selectedList.push(subVal)
})
val.selectedStr = val?.selectedList?.map(v => { return v.confName })?.join(';')
})
this.setData({
showSelectItemPopup: false,
formData
}, () => {
programeFlag = false
})
},
closeSlectItemPopup() {
let {formData} = this.data
formData?.forEach(val => {
val?.optionList?.forEach(subVal => {
subVal.active = false
let index = val?.selectedList?.findIndex(subV => subV.confId == subVal.confId)
if (index > -1) subVal.active = true
})
})
this.setData({
showSelectItemPopup: false,
formData
})
},
getConversionEmployeeList(e = {}) {
let value = ''
if (e?.detail) {
......
......@@ -3,6 +3,7 @@
"usingComponents": {
"weekCalendar": "./components/weekCalendar/weekCalendar",
"gl-cell-staff": "./components/GlCell/GlCell",
"store-picker": "./components/storePicker/storePicker"
"store-picker": "./components/storePicker/storePicker",
"select-item-popup": "./components/selectItemPopup/selectItemPopup"
}
}
\ No newline at end of file
......@@ -4,7 +4,6 @@ page {
}
.layout {
opacity: 0;
// height: 100%;
height: 100vh;
// display: flex;
......@@ -49,29 +48,6 @@ page {
transform: rotate(-180deg) translateY(0);
}
// .noListText {
// // padding: var(--fontSize40);
// height: calc(100% - var(--fontSize88));
// text-align: center;
// // line-height: 100%;
// display: flex;
// justify-content: center;
// background-color: #fff;
// align-items: center;
// border-radius: var(--fontSize12);
// flex-direction: column;
// color: #969799;
// .image {
// width: var(--fontSize320);
// height: var(--fontSize392);
// }
// .text {
// margin-top: calc(-1 * var(--fontSize65));
// }
// }
.opacity {
opacity: 1;
}
......@@ -123,47 +99,95 @@ page {
overflow: hidden;
margin-top: var(--fontSize20);
height: calc(100% - var(--fontSize100));
padding: var(--fontSize24) 0;
.input-item{
padding: 0 var(--fontSize40);
color: #292D33;
font-size: var(--fontSize28);
.label{
margin-bottom: var(--fontSize16);
text{
color: #347BFF;
}
.required_text{
color: #F24724;
margin-right: var(--fontSize8);
}
}
.content-input{
height: var(--fontSize72);
background: #FFFFFF;
border: var(--fontSize2) solid #ECECEC;
padding: 0 var(--fontSize24);
border-radius: var(--fontSize8);
margin-bottom: var(--fontSize24);
}
.content-input.disabled{
background: #EFF0F2;
}
.content-input.flex{
display: flex;
align-items: center;
justify-content: space-between;
input{
width: calc(100% - var(--fontSize40))
}
}
.input-placeholder{
color: #BEC1C7;
}
}
.pickerCell {
.cell-label {
font-weight: 400;
font-size: var(--fontSize28);
color: #292D33;
}
.picker {
display: flex;
flex-direction: row-reverse;
height: var(--fontSize80);
line-height: var(--fontSize80);
text-align: right;
.placeholder {
font-weight: 400;
font-size: var(--fontSize28);
color: #B6B6B8;
}
.pickerArrow {
width: var(--fontSize28);
height: var(--fontSize26);
margin-top: var(--fontSize26);
flex-shrink: 0;
}
}
}
}
.remark_box {
padding: var(--fontSize20);
}
.remark_box .label {
font-size: var(--fontSize28);
color: #292D33;
margin: var(--fontSize20) 0 var(--fontSize24) var(--fontSize20);
}
.remark_box .textArea_box {
font-size: var(--fontSize28);
background: #F7F8FA;
border: var(--fontSize2) solid #EFF0F2;
border-radius: var(--fontSize16);
padding: var(--fontSize24);
}
.remark_box .textArea_box .textarea {
height: var(--fontSize130);
}
.remark_box .textArea_box .currentWordNumber {
color: #BEC1C7;
text-align: right;
}
.input {
text-align: center;
font-size: var(--fontSize28);
height: 100%;
}
.placeholder-class {
color: #BEC1C7;
}
.box .item-disabled {
opacity: .4;
.label {
font-size: var(--fontSize28);
color: #292D33;
margin: var(--fontSize20) 0 var(--fontSize24) var(--fontSize20);
}
.textArea_box {
font-size: var(--fontSize28);
background: #FFFFFF;
border: var(--fontSize2) solid #EFF0F2;
border-radius: var(--fontSize16);
padding: var(--fontSize24);
.textarea {
height: var(--fontSize130);
}
.currentWordNumber {
color: #BEC1C7;
text-align: right;
}
}
.textArea_box.disabled{
background: #EFF0F2;
}
}
.btns {
......@@ -188,6 +212,7 @@ page {
width: 100%;
box-sizing: border-box;
display: flex;
flex-flow: column;
padding: var(--fontSize10) 0;
}
......@@ -213,10 +238,10 @@ page {
}
.btns .save {
width: var(--fontSize186);
width: 100%;
margin-top: var(--fontSize20);
margin-right: var(--fontSize20);
color: #347BFF;
margin-right: var(--fontSize20);
}
.btns .confirm {
......@@ -226,12 +251,6 @@ page {
background-color: #347BFF;
}
.btns .save.disabled {
border: 1px solid #DCDEE0;
color: #c0c0cc;
}
.btns .tips {
box-sizing: border-box;
display: flex;
......@@ -427,7 +446,7 @@ page {
.approvalFromSuperiorsCon {
box-sizing: border-box;
padding-bottom: var(--fontSize175);
padding-bottom: var(--fontSize300);
}
.camera-icon {
......@@ -446,12 +465,4 @@ page {
font-size: var(--fontSize24);
color: #BEC1C7;
text-align: center;
}
.disabled .cell-box {
opacity: 0.6;
}
.disabled {
opacity: 0.6;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!