Commit dc72338c by Jaxon

merge: 合并代码

2 parents 65860989 770f38d0
Showing 58 changed files with 2488 additions and 258 deletions
......@@ -70,5 +70,13 @@ module.exports = {
// 人员带教
submitMentorData(data) {
return api.post('dj.api.supervisor.mini.team.coaching.submit', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取人员带教表单字典数据
getMentorDictList(data) {
return api.post('dj.api.staff.miniprogram.dict.list', data, [], '/rop-dj-staff-miniprogram/router')
},
// 获取带教参与人员列表数据
getParticipantOptions(data) {
return api.post('dj.api.supervisor.mini.team.staff.baseInfo.page', data, [], '/rop-dj-supervisor-mini/router')
}
}
......@@ -4,6 +4,10 @@ module.exports = {
getSupervisorStaticData(data) {
return api.post('dj.api.supervisor.mini.get.teamOverview', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取任务tab统计数据
getTaskTabData(data) {
return api.post('dj.api.supervisor.mini.get.unfinishedTaskCount', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取任务列表数据
getMissionList(data) {
return api.post('dj.api.supervisor.mini.page.task', data, [], '/rop-dj-supervisor-mini/router')
......@@ -77,4 +81,62 @@ module.exports = {
findConversationDetailByBatchIdNew(data) {
return api.post('dj.api.car.boutique.inspection.findConversationDetailByBatchIdNew', data, [], '/rop-dj-car-boutique/router')
},
/**
* 获取提报的优秀案例录音列表
*/
getSubmitCaseAudioList(data) {
return api.post('dj.api.supervisor.mini.excellent.case.listByTaskId', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取带教要求完成数据列表
*/
getMentorRequireList(data) {
return api.post('dj.api.supervisor.mini.page.teachingRecords', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取任务中心的专项带教任务列表数据
*/
getTaskCenterPageData(data) {
return api.post('dj.api.supervisor.mini.taskCenter.page', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取任务中心专项带教任务详情
*/
getTaskCenterDetail(data) {
return api.post('dj.api.supervisor.mini.taskCenter.getDetail',data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 执行任务中心专项带教任务
*/
executeTaskCenter(data) {
return api.post('dj.api.supervisor.mini.taskCenter.execute',data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取我发起的专项任务列表
*/
getSpecialTaskList(data) {
return api.post('dj.api.supervisor.mini.specialTask.page', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 发起专项任务
*/
createSpecialTask(data) {
return api.post('dj.api.supervisor.mini.specialTask.create', data, [], '/rop-dj-supervisor-mini/router')
},
// 获取门店配置的区域运营(D+平台)
getAreaOperatorList(data) {
return api.post('dj.api.supervisor.mini.list.regionOperator', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取专项任务详情
*/
getSpecialTaskDetail(data) {
return api.post('dj.api.supervisor.mini.specialTask.getDetail', data, [], '/rop-dj-supervisor-mini/router')
},
/**
* 获取我发起的专项任务统计数据
*/
getSpecialTaskCount(data) {
return api.post('dj.api.supervisor.mini.specialTask.count', data, [], '/rop-dj-supervisor-mini/router')
}
}
......@@ -61,7 +61,11 @@
"pages/monthlyPlan/monthlyPlan",
"pages/specialTask/specialTask",
"pages/stationStaffPerformance/stationStaffPerformance",
"pages/storePerformance/storePerformance"
"pages/storePerformance/storePerformance",
"pages/mySpecialTaskList/mySpecialTaskList",
"pages/specialTaskApply/specialTaskApply",
"pages/mentorRequirements/mentorRequirements",
"pages/caseAudioList/caseAudioList"
]
},
{
......@@ -72,7 +76,8 @@
"pages/storeTransfer/storeTransfer",
"pages/receptionRecording/receptionRecording",
"pages/recordingDetail/recordingDetail",
"pages/mentoring/mentoring"
"pages/mentoring/mentoring",
"pages/specialMentoring/specialMentoring"
]
},
{
......
......@@ -19,7 +19,8 @@ Component({
}
}
},
scroll: Boolean
scroll: Boolean,
badge: Boolean
},
/**
* 组件的初始数据
......
......@@ -14,8 +14,9 @@
<view class="tab" style="grid-template-columns: repeat({{tabList.length}}, 1fr);font-size:{{tabList.length>5?'var(--fontSize24)':''}} ;">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count}}"><text style="margin: 0 6rpx;">·</text>{{item.count}}</text></text>
</view>
<text id="tab-{{index}}"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count && !badge}}"><text style="margin: 0 6rpx;">·</text>{{item.count}}</text></text>
<view wx:if="{{badge && item.count}}" class="badge">{{item.count}}</view>
</view>
</block>
<view class="active-doc" style="{{activeStyle}}" />
</view>
......
......@@ -38,6 +38,7 @@
.tab .tab-item {
text-align: center;
margin-right: 32rpx;
position: relative;
}
.scroll .tab-item {
......@@ -61,4 +62,19 @@
border-radius: var(--fontSize6);
background-color: #2C66F7;
content: '';
}
.badge {
padding: 0 10rpx;
height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
color: #FFFFFF;
border-radius: 32rpx;
background: #F24724;
position: absolute;
top: -12rpx;
left: 134rpx;
font-size: 20rpx;
}
\ No newline at end of file
......@@ -395,12 +395,18 @@ Component({
},
// 年月日确认
confirm() {
const { selectedDate, timeType, currentWeek, current } = this.data;
const { selectedDate, timeType, currentWeek } = this.data;
const baseDate = selectedDate || this.data.currentDate || dayjs().valueOf();
const formatMap = {
date: () => dayjs(selectedDate).format('YYYY/MM/DD'),
'year-month': () => dayjs(selectedDate).format('YYYY/MM'),
date: () => dayjs(baseDate).format('YYYY/MM/DD'),
'year-month': () => dayjs(baseDate).format('YYYY/MM'),
week: () => `${currentWeek.startDate}-${currentWeek.endDate}`
};
const valueMap = {
date: () => dayjs(baseDate).valueOf(),
'year-month': () => dayjs(baseDate).valueOf(),
week: () => dayjs(currentWeek?.startDate, 'YYYY/MM/DD').valueOf()
};
// 边界状态统一计算
const calcBoundary = () => {
const { timeType, selectedDate, currentWeek, weekColumns, minDate } = this.data;
......@@ -411,7 +417,7 @@ Component({
case 'date': {
const today = dayjs().startOf('day');
const min = dayjs(minDate).startOf('day');
const sel = dayjs(selectedDate).startOf('day');
const sel = dayjs(selectedDate || this.data.currentDate || this.data.date).startOf('day');
rightCurrent = sel.isSame(today, 'day');
leftCurrent = sel.isSame(min, 'day');
break;
......@@ -419,7 +425,7 @@ Component({
case 'year-month': {
const current = dayjs().startOf('month');
const min = dayjs(minDate).startOf('month');
const sel = dayjs(selectedDate);
const sel = dayjs(selectedDate || this.data.currentDate || this.data.date);
rightCurrent = sel.isSame(current, 'month');
leftCurrent = sel.isSame(min, 'month');
break;
......@@ -438,7 +444,7 @@ Component({
calcBoundary();
this.setData({
dateShow: false,
currentDate: (formatMap[timeType] || (() => ''))(),
currentDate: (valueMap[timeType] || (() => dayjs().valueOf()))(),
date: (formatMap[timeType] || (() => ''))()
}, () => {
this._emitPopupVisible(false)
......
......@@ -39,7 +39,7 @@ Component({
methods: {
onViewItem(e) {
let { record, detailInfo } = this.data
record.storeManagerName = detailInfo.storeManagerName
record.storeManagerName = detailInfo.storeManagerName || record.salesName
wx.navigateTo({
url: `/packageCrew/pages/recordingDetail/recordingDetail?record=${JSON.stringify(record)}`,
})
......
......@@ -5,7 +5,7 @@
<view class="phone">{{record.phoneNumber}}</view>
</view>
<view class="right">
<view class="staff">{{detailInfo.storeManagerName || '-'}}</view>
<view class="staff">{{detailInfo.storeManagerName || record.salesName || '-'}}</view>
<view class="status" style="color: {{statusMap[record.receptionResult].color}};background: {{statusMap[record.receptionResult].background}}">{{record.receptionResult}}</view>
</view>
</view>
......
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
......
......@@ -134,8 +134,63 @@ page{
}
}
}
.multi-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multi-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multi-select__label {
color: #292D33;
}
.multi-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multi-select__body {
margin-bottom: 12rpx;
}
.multi-placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.multi-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multi-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 20rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multi-tag__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #292D33;
}
.multi-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
}
.remark_box {
height: 592rpx;
height: 382rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
......@@ -149,7 +204,7 @@ page{
padding: 24rpx 24rpx 42rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 480rpx;
height: 262rpx;
position: relative;
font-size: 28rpx;
.textarea {
......@@ -219,24 +274,32 @@ page{
}
}
}
.footer-btn {
padding-bottom: 20rpx;
.btn {
margin: 52rpx 64rpx;
width: calc(100% - 128rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
&.fixed-btn {
position: fixed;
left: 0;
bottom: 144rpx;
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
}
\ No newline at end of file
}
......@@ -9,52 +9,96 @@
人员带教
</view>
</navigation-bar>
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced style="padding-top: {{navBarHeight}}px;">
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{orderObj.taskStatus != 2 ? (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') : '0'}};">
<view style="width: 100%;height: 8rpx;"></view>
<view class="box">
<view class="name">
<view class="staff">
<view class="text-hide staff-name">{{orderObj.storeManagerName}}</view>
<image class="sex-icon" src="{{IMG_URL}}{{orderObj.gender == '女' ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
</view>
</view>
<view class="items">
<view class="item {{item.inline ? 'inline' : ''}}" style="{{item.width ? ('width:' + item.width + ';') : ''}}" wx:for="{{detailItems}}" wx:key="index">
<view class="label">{{item.label}}:</view>
<view class="value">{{orderObj[item.key] || '-'}}</view>
</view>
</view>
</view>
<view class="box padding-0">
<view class="item-box">
<view class="label">督导门店<text class='required'>*</text></view>
<view class="value" bindtap="chooseSelect" data-type="merchant">
<text wx:if="{{orderObj.merchantName}}" class="value-text">{{orderObj.merchantName}}</text>
<block wx:else>
<text class="placeholder">点击选择</text>
</block>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view>
<view class="item-box">
<view class="label">推送课程<text class='required'>*</text></view>
<view class="value" bindtap="chooseSelect" data-type="course">
<text wx:if="{{orderObj.courseList.length}}" class="value-text">已选{{orderObj.courseList.length}}课</text>
<block wx:else>
<text class="placeholder">点击选择</text>
</block>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view>
<block wx:for="{{formItems}}" wx:key="index">
<block wx:if="{{!item.hide}}">
<!-- <view class="item-box">
<view class="label">{{item.label}}<text class='required'>*</text></view>
<view wx:if="{{item.type == 'select'}}" class="value" bindtap="chooseSelect" data-item="{{item}}">
<block wx:if="{{orderObj[item.valueText] || orderObj[item.value].length}}">
<text wx:if="{{item.selectMultiple}}">已选{{orderObj[item.value].length}}{{item.unit}}</text>
<text wx:if="{{orderObj[item.valueText]}}" class="value-text">{{orderObj[item.valueText]}}</text>
</block>
<block wx:else>
<text wx:if="{{!item.selectMultiple}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">点击选择(可多选)</text>
</block>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
<view class="value_box" wx:elif="{{item.type == 'radio'}}">
<view class="radio-box" wx:for="{{teaching_scene_list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" bindtap="changeScene" data-value="{{subItem.itemValue}}">
<image wx:if="{{orderObj.teachingSceneCode == subItem.itemValue}}" class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/radio-checked.png" mode=""/>
<view wx:else class="circle"></view>
<view class="text">{{subItem.itemName}}</view>
</view>
</view>
<view wx:else class="value" bindtap="chooseTime">
<text wx:if="{{orderObj[item.value]}}" class="value-text">{{orderObj[item.value]}}</text>
<block wx:else>
<text class="placeholder">点击选择</text>
</block>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view> -->
<view class="multi-select" wx:if="{{item.type == 'select' && item.selectMultiple}}" data-item="{{item}}">
<view class="multi-select__header">
<view class="multi-select__label">{{item.label}}<text class='required'>*</text></view>
<view bindtap="chooseSelect" data-item="{{item}}" style="display: flex;align-items: center;">
<text class="multi-placeholder" wx:if="{{orderObj.taskStatus != 2}}">点击选择(可多选)</text>
<image class="multi-select__arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multi-select__body" wx:if="{{orderObj[item.value] && orderObj[item.value].length}}">
<view class="multi-tags">
<block wx:for="{{orderObj[item.value]}}" wx:for-item="tag" wx:key="tagIndex" wx:for-index="tagIndex">
<view class="multi-tag">
<text class="multi-tag__text" style="max-width: {{orderObj.taskStatus == 2 ? '100%' : 'calc(100% - 36rpx)'}};">{{tag[item.itemName]}}</text>
<text class="multi-tag__close" wx:if="{{orderObj.taskStatus != 2}}" catchtap="removeMultiSelected" data-field="{{item.value}}" data-index="{{tagIndex}}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box" wx:else>
<view class="label">{{item.label}}<text class='required'>*</text></view>
<view wx:if="{{item.type == 'select'}}" class="value" bindtap="chooseSelect" data-item="{{item}}">
<block wx:if="{{orderObj[item.valueText]}}">
<text class="value-text">{{orderObj[item.valueText]}}</text>
</block>
<block wx:else>
<text class="placeholder">点击选择</text>
</block>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
<view class="value_box" wx:elif="{{item.type == 'radio'}}">
<view class="radio-box" wx:for="{{teaching_scene_list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" bindtap="changeScene" data-value="{{subItem.itemValue}}">
<image wx:if="{{orderObj.teachingSceneCode == subItem.itemValue}}" class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/radio-checked.png" mode=""/>
<view wx:else class="circle"></view>
<view class="text">{{subItem.itemName}}</view>
</view>
</view>
<view wx:else class="value" bindtap="chooseTime">
<text wx:if="{{orderObj[item.value]}}" class="value-text">{{orderObj[item.value]}}</text>
<block wx:else>
<text class="placeholder">点击选择</text>
</block>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view>
</block>
</block>
<view class="item-box remark_box">
<view class="label">带教记录<text class='required'>*</text></view>
<view class="label">带教内容摘要<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="taskContextInput" />
<view class="currentWordNumber">{{taskContextLength || 0}} / 1000</view>
</view>
</view>
<view class="image-box">
<view class="label">门店拍照<text class='required'>*</text></view>
<view class="label">带教照片佐证<text class='required'>*</text></view>
<view class="upload_box">
<block wx:if="{{orderObj.imageList.length > 0}}">
<view class="payVoucher_image" wx:for="{{orderObj.imageList}}" wx:key="index">
......@@ -73,8 +117,12 @@
</view>
</view>
</view>
<view class="footer-btn" wx:if="{{orderObj.taskStatus != 2}}">
<view class="btn {{orderObj.onBreak == 'Y' ? 'fixed-btn' : ''}}" bindtap="submit">提交</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" multiple="{{selectMultiple}}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" labelKey="{{labelKey}}" valueKey="{{valueKey}}" height="80%" title="{{selectTitle}}" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
\ No newline at end of file
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{orderObj.taskStatus != 2}}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" multiple="{{selectMultiple}}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" labelKey="{{labelKey}}" valueKey="{{valueKey}}" height="{{selectPopupHeight}}" title="{{selectTitle}}" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
<popup bindcancel="cancel" bindconfirm="confirm" wx:if="{{dateShow}}" show="{{dateShow}}" title="时间选择" height="60vh">
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" bind:change="onChange" bind:input="onInput" />
</popup>
......@@ -226,9 +226,8 @@ Page({
// 发起带教
handleMentoring() {
wx.$track.setTrackData(0, `supervisor_start_mentoring`, {}, '')
let { baseInfo } = this.data
wx.navigateTo({
url: `/packageCrew/pages/mentoring/mentoring?storeManagerName=${baseInfo.name}&gender=${baseInfo.gender}&storeManagerPhone=${baseInfo.phone}&entryDate=${baseInfo.entryDate || ''}&business=${baseInfo.business || ''}`,
url: `/packageCrew/pages/mentoring/mentoring`,
})
},
// 调店记录
......
{
"usingComponents": {
"record-item": "./components/recordItem/recordItem",
"record-item": "/components/recordItem/recordItem",
"date-screen": "/components/dateScreen/dateScreen"
},
"navigationBarTitleText": "接待录音"
......
......@@ -29,6 +29,7 @@ Page({
*/
async onLoad(options) {
const record = JSON.parse(options.record)
console.log(record, '22222222')
this.setData({
record,
detailInfo: {storeManagerName: record.storeManagerName},
......
{
"usingComponents": {
"quality": "./components/quality/quality",
"record-item": "../receptionRecording/components/recordItem/recordItem",
"record-item": "/components/recordItem/recordItem",
"dialogue":"./components/dialogue/dialogue"
},
"navigationStyle": "custom"
......
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
}
/* packageCrew/pages/specialMentoring/specialMentoring.wxss */
page{
background: #F2F3F7;
}
.required {
color: #F24724;
margin-left: 8rpx;
}
.container {
height: 100vh;
box-sizing: border-box;
width: calc(100% - 48rpx);
margin: 0 24rpx;
.box {
border-radius: 32rpx;
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
&.padding-0 {
padding: 0;
}
.name {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
.staff {
display: flex;
align-items: center;
font-size: 36rpx;
width: 100%;
color: #333333;
.staff-name {
max-width: calc(100% - 40rpx);
word-break: break-all;
}
.sex-icon {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
margin-left: 12rpx;
}
}
}
.items {
display: flex;
flex-wrap: wrap;
column-gap: 24rpx;
row-gap: 18rpx;
.item {
width: 100%;
display: flex;
align-items: center;
font-size: 26rpx;
color: #79859E;
.label {
flex-shrink: 0;
}
}
.inline {
flex: 1;
min-width: 0;
.value {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
}
.item-box {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.label {
color: #292D33;
}
.value {
display: flex;
align-items: center;
justify-content: flex-end;
width: calc(100% - 158rpx);
.value-text {
text-align: right;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.input {
text-align: right;
font-size: 28rpx;
padding: 16rpx 0;
width: 100%;
}
image {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
}
.value_box {
display: flex;
align-items: center;
gap: 32rpx;
.radio-box {
display: flex;
align-items: center;
gap: 16rpx;
.radio-icon {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
}
.circle {
flex-shrink: 0;
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #d0d2d6;
}
.text {
color: #292D33;
font-size: 28rpx;
}
}
}
}
.multi-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multi-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multi-select__label {
color: #292D33;
}
.multi-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multi-select__body {
margin-bottom: 12rpx;
}
.multi-placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.multi-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multi-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 20rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multi-tag__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #292D33;
}
.multi-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
}
.remark_box {
height: 382rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
.label {
margin: 28rpx 0;
}
.textArea_box {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 262rpx;
position: relative;
font-size: 28rpx;
.textarea {
height: 100%;
width: 100%;
}
.currentWordNumber {
position: absolute;
right: 26rpx;
bottom: 8rpx;
color: #CCCCCC;
}
}
}
.image-box {
margin: 0 32rpx;
padding-bottom: 28rpx;
.label{
margin: 28rpx 0;
}
.upload_box{
display: flex;
flex-wrap: wrap;
gap: 28rpx;
.payVoucher_image{
flex-shrink: 0;
width: 192rpx;
height: 192rpx;
border-radius: 12rpx;
position: relative;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
.del_icon{
width: 40rpx;
height: 40rpx;
position: absolute;
top: 16rpx;
right: 16rpx;
}
}
.upload-item {
width: 196rpx;
height: 196rpx;
border-radius: 12rpx;
background: #f5f5f7;
display: flex;
align-items: center;
justify-content: center;
flex-flow: column;
.icon-uploadAdd {
width: 40rpx;
height: 40rpx;
&.custom-icon-uploadAdd {
width: 100%;
height: 100%;
}
}
.upload-text {
margin-top: 16rpx;
color: #999EA8;
font-size: 24rpx;
}
}
}
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
}
<!--packageCrew/pages/specialMentoring/specialMentoring.wxml-->
<glsx-privacy appletName="嘀加门店管理助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
showBack="{{true}}"
bindback="back"
navStyle="background-color: transparent;box-shadow:none;">
<view class="page-title">
专项带教
</view>
</navigation-bar>
<scroll-view class="container" scroll-y show-scrollbar="{{false}}" enhanced style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{!isCompleted ? (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') : '0'}};">
<view style="width: 100%;height: 8rpx;"></view>
<view class="box padding-0">
<block wx:for="{{formItems}}" wx:key="index">
<block wx:if="{{!item.hide}}">
<view class="multi-select" wx:if="{{item.type == 'select' && item.selectMultiple}}" data-item="{{item}}">
<view class="multi-select__header">
<view class="multi-select__label">{{item.label}}<text class='required'>*</text></view>
<view bindtap="chooseSelect" data-item="{{item}}" style="display: flex;align-items: center;">
<text class="multi-placeholder" wx:if="{{!isCompleted && !lockedFields[item.value]}}">点击选择(可多选)</text>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="multi-select__arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multi-select__body" wx:if="{{orderObj[item.value] && orderObj[item.value].length}}">
<view class="multi-tags">
<block wx:for="{{orderObj[item.value]}}" wx:for-item="tag" wx:key="tagIndex" wx:for-index="tagIndex">
<view class="multi-tag">
<text class="multi-tag__text" style="max-width: {{(isCompleted || lockedFields[item.value]) ? '100%' : 'calc(100% - 36rpx)'}};">{{tag[item.itemName]}}</text>
<text class="multi-tag__close" wx:if="{{!isCompleted && !lockedFields[item.value]}}" catchtap="removeMultiSelected" data-field="{{item.value}}" data-index="{{tagIndex}}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box" wx:else>
<view class="label">{{item.label}}<text class='required'>*</text></view>
<view wx:if="{{item.type == 'select'}}" class="value" bindtap="chooseSelect" data-item="{{item}}">
<block wx:if="{{orderObj[item.valueText]}}">
<text class="value-text">{{orderObj[item.valueText]}}</text>
</block>
<block wx:else>
<text wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">-</text>
</block>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
<view class="value_box" wx:elif="{{item.type == 'radio'}}">
<view class="radio-box" wx:for="{{teaching_scene_list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex" bindtap="changeScene" data-value="{{subItem.itemValue}}">
<image wx:if="{{orderObj.teachingSceneCode == subItem.itemValue}}" class="radio-icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/radio-checked.png" mode=""/>
<view wx:else class="circle"></view>
<view class="text">{{subItem.itemName}}</view>
</view>
</view>
<view wx:else class="value" bindtap="chooseTime">
<text wx:if="{{orderObj[item.value]}}" class="value-text">{{orderObj[item.value]}}</text>
<block wx:else>
<text wx:if="{{!isCompleted && !lockedFields[item.value]}}" class="placeholder">点击选择</text>
<text wx:else class="placeholder">-</text>
</block>
<image wx:if="{{!isCompleted && !lockedFields[item.value]}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode=""/>
</view>
</view>
</block>
</block>
<view class="item-box remark_box">
<view class="label">带教内容摘要<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{isCompleted || lockedFields.assigneeDetail}}" value="{{ orderObj.assigneeDetail }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="assigneeDetailInput" />
<view class="currentWordNumber">{{assigneeDetailLength || 0}} / 1000</view>
</view>
</view>
<view class="image-box">
<view class="label">带教照片佐证<text class='required'>*</text></view>
<view class="upload_box">
<block wx:if="{{orderObj.assigneeImages.length > 0}}">
<view class="payVoucher_image" wx:for="{{orderObj.assigneeImages}}" wx:key="index">
<image bindtap="previewImage" data-index="{{index}}" data-url="{{orderObj.assigneeImages}}" src="{{item.imageUrl}}"/>
<image class="del_icon" wx:if="{{!isCompleted && !lockedFields.assigneeImages}}" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/zy_paf_del_icon.png" mode="" bindtap="delPhoto" data-index="{{index}}"/>
</view>
</block>
<block wx:if="{{orderObj.assigneeImages.length < 9 && !isCompleted && !lockedFields.assigneeImages}}">
<view class="upload-item" bindtap="handleImageUpload">
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/{{item.uploadIcon || 'zy-upload_icon.png'}}" class="icon-uploadAdd {{item.uploadIcon ? 'custom-icon-uploadAdd' : ''}}"></image>
<view class="upload-text">
{{orderObj.assigneeImages.length + '/' + 9}}
</view>
</view>
</block>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{!isCompleted}}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" multiple="{{selectMultiple}}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" labelKey="{{labelKey}}" valueKey="{{valueKey}}" height="{{selectPopupHeight}}" title="{{selectTitle}}" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
<popup bindcancel="cancel" bindconfirm="confirm" wx:if="{{dateShow}}" show="{{dateShow}}" title="时间选择" height="60vh">
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" model:value="{{ currentDate }}" bind:change="onChange" bind:input="onInput" />
</popup>
// packageIndex/pages/caseAudioList/caseAudioList.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
import api from '~/api/index/index'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 84,
list: [],
detailInfo: {}
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() {
wx.navigateBack()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
optionsId: options?.id
}, () => {
this.getData()
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
handlePresent() {
wx.switchTab({url: '/pages/tab/crew/crew'})
},
getData() {
let {optionsId} = this.data
api.getSubmitCaseAudioList({id: optionsId}).then(res => {
let { code, data, message } = res
if (code == 0) {
data?.list?.forEach(val => {
val.carBrand = val.oneCarBrand,
val.receptionResult = val.receptionStatus == 1 ? '成交' : val.receptionStatus == 0 ? '战败' : ''
})
this.setData({
list: data?.list || []
})
} else {
wx.$util.showToast(message)
}
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"record-item": "/components/recordItem/recordItem"
},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageIndex/pages/caseAudioList/caseAudioList.wxss */
page {
background: #F2F3F7;
}
.caseAudioList-page {
height: 100vh;
padding: 0 32rpx;
box-sizing: border-box;
.card-item {
margin-bottom: 16rpx;
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
&.fixed-btn {
position: fixed;
left: 0;
bottom: 144rpx;
}
}
}
\ No newline at end of file
<!--packageIndex/pages/caseAudioList/caseAudioList.wxml-->
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
showBack
bindback="back"
navStyle="background-color: transparent;box-shadow:none;">
<view class="page-title">
提报优秀案例
</view>
</navigation-bar>
<scroll-view scroll-y class="caseAudioList-page" show-scrollbar="{{false}}" enhanced style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx'}}">
<block wx:if="{{list.length}}">
<view wx:for="{{list}}" wx:key="index">
<view class="card-item">
<record-item record="{{item}}" detailInfo="{{detailInfo}}"></record-item>
</view>
</view>
</block>
<block wx:else>
<empty-data />
</block>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn" bindtap="handlePresent">去提报</view>
</view>
\ No newline at end of file
......@@ -13,8 +13,10 @@ Page({
orderObj: {
onDutyFlag: 0,
taskContext: '',
taskImageList: [],
merchantName: ''
nextWorkItems: '',
needAssistItems: '',
// taskImageList: [],
taskMerchantList: []
},
showSelectPopup: false
},
......@@ -56,8 +58,12 @@ Page({
let { code, data, message } = res
if (code == 0) {
let taskContextLength = data.taskContext?.length
let nextWorkItemsLength = data.nextWorkItems?.length
let needAssistItemsLength = data.needAssistItems?.length
this.setData({
taskContextLength
taskContextLength,
nextWorkItemsLength,
needAssistItemsLength
}, () => {
this.setData({
orderObj: data || {}
......@@ -74,7 +80,7 @@ Page({
let { code, data, message } = res
if (code == 0) {
this.setData({
merchantList: data || []
taskMerchantList: data || []
})
} else {
wx.$util.showToast(message)
......@@ -87,49 +93,60 @@ Page({
let { value } = e.currentTarget.dataset
this.setData({
'orderObj.onDutyFlag': value,
'orderObj.taskContext': '',
'orderObj.taskContext': '',
'orderObj.nextWorkItems': '',
'orderObj.needAssistItems': '',
taskContextLength: 0,
'orderObj.merchantId': '',
'orderObj.merchantName': '',
'orderObj.taskImageList': []
'orderObj.taskMerchantList': []
})
},
chooseMerchant() {
let { orderObj, merchantList } = this.data
let { orderObj, taskMerchantList } = this.data
if (orderObj.taskStatus == 2) return
this.setData({
showSelectPopup: true,
selectOptions: merchantList,
selectValue: [orderObj.merchantId]
selectOptions: taskMerchantList,
selectValues: orderObj.taskMerchantList?.map(v => { return v.merchantId })
})
},
handlePopupConfirm(e) {
let { values, items } = e.detail
this.setData({
[`orderObj.merchantId`]: values[0],
['orderObj.merchantName']: items[0]?.merchantName
'orderObj.taskMerchantList': items
}, () => {
this.hideSelectPopup()
})
},
removeMerchant(e) {
if (this.data.orderObj.taskStatus == 2) return
const index = e.currentTarget?.dataset?.index
const list = Array.isArray(this.data.orderObj?.taskMerchantList) ? this.data.orderObj.taskMerchantList.slice() : []
if (index === null || index === undefined || index < 0 || index >= list.length) return
list.splice(index, 1)
this.setData({
'orderObj.taskMerchantList': list
})
},
hideSelectPopup() {
this.setData({
showSelectPopup: false
})
},
taskContextInput(e) {
contextInput(e) {
if (this.data.orderObj.taskStatus == 2) return
let val = e.detail.value || ""
let { type } = e.currentTarget.dataset
if (val.length > 500) {
val = val.substring(0, 500)
}
this.setData({
'orderObj.taskContext': val,
taskContextLength: val.length
[`orderObj.${type}`]: val,
[`${type}Length`]: val.length
})
},
......@@ -196,16 +213,17 @@ Page({
submit() {
let { orderObj, pageQuery } = this.data
if (orderObj.onDutyFlag == 0) {
if (!orderObj.merchantId || !orderObj.taskContext || !orderObj.taskImageList.length) return wx.$util.showToast('请完成所有必填项')
if (!orderObj.taskMerchantList?.length || !orderObj.taskContext || !orderObj.nextWorkItems || !orderObj.needAssistItems) return wx.$util.showToast('请完成所有必填项')
}
let params = {
id: pageQuery?.id,
taskType: 0,
onDutyFlag: orderObj.onDutyFlag,
merchantId: orderObj.onDutyFlag == 0 ? orderObj.merchantId : '',
merchantName: orderObj.onDutyFlag == 0 ? orderObj.merchantName : '',
taskMerchantList: orderObj.onDutyFlag == 0 ? orderObj?.taskMerchantList?.map(val => {return {merchantId: val.merchantId, merchantName: val.merchantName}}) : [],
taskContext: orderObj.onDutyFlag == 0 ? orderObj.taskContext : '',
taskImageList: orderObj.onDutyFlag == 0 ? orderObj.taskImageList : [],
nextWorkItems: orderObj.onDutyFlag == 0 ? orderObj.nextWorkItems : '',
needAssistItems: orderObj.onDutyFlag == 0 ? orderObj.needAssistItems : ''
// taskImageList: orderObj.onDutyFlag == 0 ? orderObj.taskImageList : [],
}
wx.$util.showLoading()
api.submitSupervisorReport(params).then(res => {
......@@ -260,4 +278,4 @@ Page({
onShareAppMessage() {
}
})
\ No newline at end of file
})
{
"usingComponents": {
"van-icon": "@vant/weapp/icon/index",
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
......
......@@ -15,7 +15,62 @@ page {
background: #FFFFFF;
border-radius: 24rpx;
font-size: 28rpx;
.item-box {
.multiple-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multiple-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multiple-select__label {
color: #292D33;
}
.multiple-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multiple-select__body {
margin-bottom: 16rpx;
}
.multiple-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multiple-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 16rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multiple-tag__text {
font-size: 28rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #292D33;
}
.multiple-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.item-box {
height: 96rpx;
display: flex;
align-items: center;
......@@ -30,17 +85,6 @@ page {
align-items: center;
justify-content: flex-end;
width: calc(100% - 158rpx);
.value-text {
text-align: right;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
.input {
text-align: right;
font-size: 28rpx;
......@@ -82,7 +126,7 @@ page {
}
}
.remark_box {
height: 592rpx;
height: 324rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
......@@ -93,10 +137,10 @@ page {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
padding: 24rpx 24rpx 48rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 480rpx;
height: 212rpx;
position: relative;
font-size: 28rpx;
.textarea {
......@@ -166,11 +210,24 @@ page {
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
padding-bottom: 20rpx;
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 52rpx 64rpx;
width: calc(100% - 128rpx);
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
......@@ -179,10 +236,5 @@ page {
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
&.fixed-btn {
position: fixed;
left: 0;
bottom: 144rpx;
}
}
}
......@@ -9,7 +9,7 @@
督导日报
</view>
</navigation-bar>
<scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);">
<scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{orderObj.taskStatus != 2 ? (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') : '0'}};">
<view class="report-page">
<view class="item-box">
<view class="lebel">当日状态<text class='required'>*</text></view>
......@@ -27,24 +27,57 @@
</view>
</view>
<block wx:if="{{orderObj.onDutyFlag == 0}}">
<view class="item-box">
<!-- <view class="item-box">
<view class="label">选择门店<text class='required'>*</text></view>
<view class="value" bindtap="chooseMerchant">
<text wx:if="{{orderObj.merchantName}}" class="value-text">{{orderObj.merchantName}}</text>
<block wx:else>
<block wx:if="{{!orderObj.taskMerchantList.length}}">
<text class="placeholder">点击选择</text>
</block>
<text wx:else>已选{{orderObj.taskMerchantList.length}}个</text>
<image src="{{IMG_URL}}arrow.png" mode=""/>
</view>
</view> -->
<view class="multiple-select">
<view class="multiple-select__header">
<view class="multiple-select__label">选择门店<text class='required'>*</text></view>
<view bindtap="chooseMerchant">
<text class="placeholder" wx:if="{{orderObj.taskStatus != 2}}">点击选择(可多选)</text>
<image class="multiple-select__arrow" src="{{IMG_URL}}arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multiple-select__body" wx:if="{{orderObj.taskMerchantList.length}}">
<view class="multiple-tags">
<block wx:for="{{orderObj.taskMerchantList}}" wx:key="merchantId" wx:for-index="index">
<view class="multiple-tag">
<text class="multiple-tag__text" style="max-width: {{orderObj.taskStatus == 2 ? '100%' : 'calc(100% - 36rpx)'}};">{{item.merchantName}}</text>
<text class="multiple-tag__close" wx:if="{{orderObj.taskStatus != 2}}" catchtap="removeMerchant" data-index="{{index}}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box remark_box">
<view class="label">日报填写<text class='required'>*</text></view>
<view class="label">今日工作事项<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="taskContextInput" />
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="contextInput" data-type="taskContext" />
<view class="currentWordNumber">{{taskContextLength || 0}} / 500</view>
</view>
</view>
<view class="image-box">
<view class="item-box remark_box">
<view class="label">明日工作事项<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.nextWorkItems }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="contextInput" data-type="nextWorkItems" />
<view class="currentWordNumber">{{nextWorkItemsLength || 0}} / 500</view>
</view>
</view>
<view class="item-box remark_box">
<view class="label">需协助事项<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.needAssistItems }}" maxlength="500" placeholder="请输入" class="textarea" bindinput="contextInput" data-type="needAssistItems" />
<view class="currentWordNumber">{{needAssistItemsLength || 0}} / 500</view>
</view>
</view>
<!-- <view class="image-box">
<view class="label">门店拍照<text class='required'>*</text></view>
<view class="upload_box">
<block wx:if="{{orderObj.taskImageList.length > 0}}">
......@@ -62,12 +95,12 @@
</view>
</block>
</view>
</view>
</view> -->
</block>
</view>
<view class="footer-btn" wx:if="{{orderObj.taskStatus != 2}}">
<view class="btn {{orderObj.onDutyFlag == 1 ? 'fixed-btn' : ''}}" bindtap="submit">提交</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" values="{{ selectValues }}" value="{{ selectValue }}" bindconfirm="handlePopupConfirm" labelKey="merchantName" valueKey="merchantId" height="80%" title="门店选择" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
\ No newline at end of file
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{orderObj.taskStatus != 2}}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup show="{{ showSelectPopup }}" options="{{ selectOptions }}" values="{{ selectValues }}" value="{{ selectValue }}" multiple bindconfirm="handlePopupConfirm" labelKey="merchantName" valueKey="merchantId" height="80%" title="门店选择" allowSearch="{{true}}" bindcancel="hideSelectPopup"></select-popup>
// packageIndex/pages/mentorRequirements/mentorRequirements.js
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
import api from '~/api/index/index'
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL,
navBarHeight: 84,
list: []
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() {
wx.navigateBack()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
optionsId: options?.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.getList()
},
handleMentor() {
wx.navigateTo({
url: `/packageCrew/pages/mentoring/mentoring`,
})
},
getList() {
// 获取带教数据
let { optionsId } = this.data
api.getMentorRequireList({id: optionsId}).then(res => {
let { code, data, message } = res
if (code == 0) {
this.setData({
list: data?.list || []
})
} else {
wx.$util.showToast(message)
}
})
},
onViewItem(e) {
const { item } = e.currentTarget.dataset || {}
wx.navigateTo({
url: `/packageCrew/pages/mentoring/mentoring?id=${item.id}`,
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageIndex/pages/mentorRequirements/mentorRequirements.wxss */
page {
background: #F2F3F7;
}
.mentorRequire-page {
padding: 8rpx 24rpx;
height: 100vh;
box-sizing: border-box;
.list-item {
display: flex;
align-items: center;
gap: 16rpx;
padding: 16rpx;
border-radius: 24rpx;
background: #FFFFFF;
margin-bottom: 16rpx;
}
.coach {
flex-flow: column;
align-items: flex-start;
}
.icon {
width: 48rpx;
height: 48rpx;
flex-shrink: 0;
}
.content {
flex: 1;
min-width: 0;
}
.title {
color: #222222;
font-size: 28rpx;
line-height: 40rpx;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.sub {
margin-top: 8rpx;
color: #999ea8;
font-size: 24rpx;
line-height: 34rpx;
}
.btn-box {
width: 100%;
}
.btn {
float: right;
width: 88rpx;
box-sizing: border-box;
text-align: center;
height: 56rpx;
line-height: 56rpx;
border-radius: 28rpx;
border: 2rpx solid #2C66F7;
color: #347bff;
font-size: 24rpx;
background: #ffffff;
flex-shrink: 0;
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
&.fixed-btn {
position: fixed;
left: 0;
bottom: 144rpx;
}
}
}
\ No newline at end of file
<!--packageIndex/pages/mentorRequirements/mentorRequirements.wxml-->
<navigation-bar bindnavbarReady="navbarReady"
class="navigation-header"
showBack
bindback="back"
navStyle="background-color: transparent;box-shadow:none;">
<view class="page-title">
带教要求
</view>
</navigation-bar>
<scroll-view scroll-y class="mentorRequire-page" show-scrollbar="{{false}}" enhanced style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx'}};">
<block wx:if="{{list.length}}">
<view class="list-item coach" wx:for="{{list}}" wx:key="id">
<view style="display: flex;gap: 12rpx;">
<image class="icon" src="{{IMG_URL}}coaching-icon.png" mode=""/>
<view class="content">
<view class="title">{{'督导带教'}}</view>
<view class="sub">带教时间:{{item.teachingTime ||'-'}}</view>
</view>
</view>
<view class="btn-box">
<view class="btn" data-type="coach" data-item="{{item}}" bind:tap="onViewItem">查看</view>
</view>
</view>
</block>
<block wx:else>
<empty-data />
</block>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}">
<view class="btn" bindtap="handleMentor">填写带教记录</view>
</view>
\ No newline at end of file
......@@ -8,7 +8,9 @@ Page({
data: {
navBarHeight: 84,
orderObj: {
taskContext: ''
taskContext: '',
teachingProgress: '',
nextMonthPlan: ''
}
},
......@@ -50,8 +52,12 @@ Page({
let { code, data, message } = res
if (code == 0) {
let taskContextLength = data.taskContext?.length
let teachingProgressLength = data.teachingProgress?.length
let nextMonthPlanLength = data.nextMonthPlan?.length
this.setData({
taskContextLength
taskContextLength,
teachingProgressLength,
nextMonthPlanLength
}, () => {
this.setData({
orderObj: data || {}
......@@ -63,24 +69,27 @@ Page({
})
},
taskContextInput(e) {
textAreaInput(e) {
let { key } = e.currentTarget.dataset
let val = e.detail.value || ""
if (val.length > 1000) {
val = val.substring(0, 1000)
}
this.setData({
'orderObj.taskContext': val,
taskContextLength: val.length
[`orderObj.${key}`]: val,
[`${key}Length`]: val.length
})
},
submit() {
let { orderObj, pageQuery } = this.data
if (!orderObj.taskContext) return wx.$util.showToast('请完成所有必填项')
if (!orderObj.taskContext || !orderObj.teachingProgress || !orderObj.nextMonthPlan) return wx.$util.showToast('请完成所有必填项')
let params = {
id: pageQuery?.id,
taskType: 2,
taskContext: orderObj.taskContext
taskContext: orderObj.taskContext,
teachingProgress: orderObj.teachingProgress,
nextMonthPlan: orderObj.nextMonthPlan
}
wx.$util.showLoading()
api.submitMonthPlan(params).then(res => {
......
......@@ -11,7 +11,7 @@ page {
height: 100vh;
}
.monthlyPlan-page {
margin: 20rpx;
margin: 0 20rpx;
background: #FFFFFF;
border-radius: 24rpx;
font-size: 28rpx;
......@@ -27,10 +27,11 @@ page {
}
}
.remark_box {
height: 1080rpx;
height: 366rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
padding-bottom: 32rpx;
.label {
margin: 28rpx 0;
}
......@@ -38,7 +39,7 @@ page {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
padding: 24rpx 24rpx 48rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 960rpx;
......@@ -57,11 +58,24 @@ page {
}
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.footer-btn {
padding-bottom: 20rpx;
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 52rpx 64rpx;
width: calc(100% - 128rpx);
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
......
......@@ -8,17 +8,32 @@
督导月度计划
</view>
</navigation-bar>
<scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);">
<scroll-view scroll-y class="container" style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{orderObj.taskStatus != 2 ? (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') : '0'}};">
<view class="monthlyPlan-page">
<view class="item-box remark_box">
<view class="label">月度计划<text class='required'>*</text></view>
<view class="label">辖区门店情况总结<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="taskContextInput" />
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.taskContext }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="textAreaInput" data-key="taskContext" />
<view class="currentWordNumber">{{taskContextLength || 0}} / 1000</view>
</view>
</view>
<view class="item-box remark_box">
<view class="label">带教进度/结果<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.teachingProgress }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="textAreaInput" data-key="teachingProgress" />
<view class="currentWordNumber">{{teachingProgressLength || 0}} / 1000</view>
</view>
</view>
<view class="item-box remark_box">
<view class="label">下月计划<text class='required'>*</text></view>
<view class="textArea_box">
<textarea placeholder-style="color: #999EA8;" disabled="{{orderObj.taskStatus == 2}}" value="{{ orderObj.nextMonthPlan }}" maxlength="1000" placeholder="请输入" class="textarea" bindinput="textAreaInput" data-key="nextMonthPlan" />
<view class="currentWordNumber">{{nextMonthPlanLength || 0}} / 1000</view>
</view>
</view>
</view>
<view class="footer-btn" wx:if="{{orderObj.taskStatus != 2}}">
<view class="btn {{orderObj.onBreak == 'Y' ? 'fixed-btn' : ''}}" bindtap="submit">提交</view>
</view>
</scroll-view>
\ No newline at end of file
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{orderObj.taskStatus != 2}}">
<view class="btn {{orderObj.onBreak == 'Y' ? 'fixed-btn' : ''}}" bindtap="submit">提交</view>
</view>
\ No newline at end of file
import api from '~/api/index/index'
import dayjs from 'dayjs'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/'
Page({
data: {
IMG_URL,
navBarHeight: 84,
statusMap: {
0: { name: '待完成', color: '#2C66F7', background: '#2c66f71a' },
1: { name: '已完成', color: '#35C376', background: '#35c3761a' }
},
list: [],
total: 0,
pageNum: 1,
pageSize: 10,
nothing: false,
flag: false
},
navbarReady(e) {
const navBarHeight = e.detail?.height
if (!navBarHeight) return
this.setData({ navBarHeight })
},
onLoad() {
this.reload()
},
onShow() {},
reload() {
this.setData(
{
list: [],
total: 0,
pageNum: 1,
nothing: false,
flag: false
},
() => {
this.getList(true)
}
)
},
onBottom() {
this.getList()
},
getList(reload) {
const { pageNum, pageSize, nothing } = this.data
if (nothing) return
const params = {
pageNum,
pageSize
}
wx.$util.showLoading()
api
.getSpecialTaskList(params)
.then(res => {
wx.$util.hideLoading()
const { code, data, message } = res || {}
if (code != 0) {
wx.$util.showToast(message || '加载失败')
this.setData({ flag: true })
return
}
const pageList = Array.isArray(data?.list) ? data.list : []
pageList.forEach(val => {
val.completeTime = val.completeTime ? dayjs(val.completeTime).format('YYYY-MM-DD HH:mm:ss') : ''
})
const nextList = reload ? pageList : this.data.list.concat(pageList)
const total = data?.total || 0
const isNothing = pageNum == data?.pages
this.setData({
list: nextList,
total,
pageNum: pageNum + 1,
nothing: !!isNothing,
flag: true
})
})
.catch(() => {
wx.$util.hideLoading()
this.setData({ flag: true })
})
},
viewDetail(e) {
const item = e.currentTarget?.dataset?.item || {}
wx.navigateTo({
url: `/packageIndex/pages/specialTaskApply/specialTaskApply?id=${item.id}`
})
},
goCreate() {
wx.navigateTo({
url: '/packageIndex/pages/specialTaskApply/specialTaskApply'
})
},
back() {
wx.navigateBack()
}
})
{
"usingComponents": {},
"navigationStyle": "custom"
}
page {
background: #F2F3F7;
}
.page-title {
font-size: var(--fontSize34);
color: #222222;
font-weight: 600;
}
.container {
height: 100vh;
box-sizing: border-box;
}
.count {
padding: 16rpx 24rpx;
font-size: 24rpx;
color: #999999;
}
.list {
padding: 0 24rpx 24rpx;
box-sizing: border-box;
}
.item {
border-radius: 24rpx;
background: #FFFFFF;
padding: 24rpx;
margin-bottom: 24rpx;
box-sizing: border-box;
}
.item-top {
display: flex;
align-items: center;
}
.status {
font-size: 22rpx;
padding: 8rpx 12rpx;
border-radius: 8rpx;
flex-shrink: 0;
}
.name {
margin-left: 12rpx;
font-size: 28rpx;
font-weight: 500;
color: #222222;
flex: 1 1 auto;
min-width: 0;
}
.btn {
flex: 0 0 auto;
text-align: center;
padding: 12rpx 34rpx;
border-radius: 60rpx;
color: #2C66F7;
font-size: 26rpx;
font-weight: 500;
background: #2c66f71a;
box-sizing: border-box;
}
.item-actions {
margin-top: 24rpx;
display: flex;
justify-content: flex-end;
}
.row {
margin-top: 24rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #999999;
}
.icon {
margin-right: 8rpx;
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
}
.label {
flex: 0 0 auto;
}
.value {
flex: 1 1 auto;
min-width: 0;
}
.list-nothing {
text-align: center;
color: #999999;
font-size: 24rpx;
padding: 24rpx 0;
}
<navigation-bar
bindnavbarReady="navbarReady"
class="navigation-header"
showBack
bindback="back"
navStyle="background-color: #FFFFFF;box-shadow:none;"
>
<view class="page-title">我发起的专项任务</view>
</navigation-bar>
<scroll-view
scroll-y
class="container"
enhanced="{{true}}"
show-scrollbar="{{false}}"
style="padding-top: {{navBarHeight}}px;padding-bottom: 40rpx;"
bindscrolltolower="onBottom"
>
<view class="count">共{{ total || 0 }}条任务</view>
<view class="list">
<block wx:for="{{ list }}" wx:key="id">
<view class="item">
<view class="item-top">
<view
class="status text-center"
style="color: {{statusMap[item.taskStatus].color}}; background-color: {{statusMap[item.taskStatus].background}};"
>
{{statusMap[item.taskStatus].name}}
</view>
<view class="name text-hide">{{ item.categoryName || '-' }}</view>
</view>
<view class="row" wx:if="{{ item.merchantName }}">
<image class="icon" src="{{IMG_URL}}special-task-merchant.png" mode="" />
<view class="label">归属门店:</view>
<view class="value text-hide">{{ item.merchantName }}</view>
</view>
<view class="row" wx:if="{{ item.regionOperatorName }}">
<image class="icon" src="{{IMG_URL}}special-task-staff.png" mode="" />
<view class="label">指定区域运营:</view>
<view class="value text-hide">{{ item.regionOperatorName || '-' }}</view>
</view>
<view class="row" wx:if="{{ item.taskStatus == 1 }}">
<image class="icon" src="{{IMG_URL}}time-icon.png" mode="" />
<view class="label">完成时间:</view>
<view class="value">{{ item.completeTime || '-' }}</view>
</view>
<view class="item-actions">
<view class="btn" bindtap="viewDetail" data-item="{{ item }}">查看</view>
</view>
</view>
</block>
<view class="list-nothing" wx:if="{{ nothing && list.length }}">到底了~</view>
<empty-data wx:if="{{ flag && !list.length }}" />
</view>
</scroll-view>
{
"usingComponents": {
"select-popup": "/components/selectPopup/selectPopup"
},
"navigationStyle": "custom"
}
page {
background: #F2F3F7;
}
.page-title {
font-size: var(--fontSize34);
color: #222222;
font-weight: 600;
}
.required {
color: #F24724;
margin-left: 8rpx;
}
.container {
height: 100vh;
box-sizing: border-box;
width: calc(100% - 48rpx);
margin: 0 24rpx;
}
.box {
border-radius: 32rpx;
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
&.padding-0 {
padding: 0;
}
}
.item-box {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
box-sizing: border-box;
.label {
color: #292D33;
flex: 0 0 auto;
}
.value {
display: flex;
align-items: center;
justify-content: flex-end;
width: calc(100% - 158rpx);
min-width: 0;
image {
width: 32rpx;
height: 32rpx;
flex-shrink: 0;
transform: rotate(-90deg)
}
}
.value-text {
text-align: right;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #292D33;
}
.placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
}
.value_box {
flex: 1 1 auto;
min-width: 0;
display: flex;
justify-content: flex-end;
gap: 24rpx;
.radio-box {
display: flex;
align-items: center;
gap: 10rpx;
.radio-icon {
width: 32rpx;
height: 32rpx;
}
.circle {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #D9DDE3;
box-sizing: border-box;
}
.text {
color: #292D33;
font-size: 28rpx;
}
}
}
.multi-select {
padding: 0 32rpx;
border-bottom: 1rpx solid #eff0f2;
.multi-select__header {
height: 96rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.multi-select__label {
color: #292D33;
}
.multi-select__arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
transform: rotate(-90deg);
}
.multi-select__body {
margin-bottom: 12rpx;
}
.multi-placeholder {
color: #BEC1C7;
font-size: 28rpx;
}
}
.multi-tags {
display: flex;
flex-wrap: wrap;
gap: 24rpx;
}
.multi-tag {
display: inline-flex;
align-items: center;
max-width: 100%;
padding: 0 12rpx;
height: 44rpx;
border-radius: 8rpx;
background: #F6F7F9;
border: 2rpx solid #E6E8EC;
box-sizing: border-box;
}
.multi-tag__text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #292D33;
}
.multi-tag__close {
margin-left: 16rpx;
color: #999EA8;
font-size: 32rpx;
line-height: 1;
}
.remark_box {
height: 382rpx;
align-items: flex-start;
justify-content: flex-start;
flex-flow: column;
border-bottom: none;
.label {
margin: 28rpx 0;
width: 100%;
}
.textArea_box {
box-sizing: border-box;
width: 100%;
border-radius: 16rpx;
padding: 24rpx 24rpx 42rpx;
background: #FFFFFF;
border: 2rpx solid #eff0f2;
height: 262rpx;
position: relative;
font-size: 28rpx;
.textarea {
height: 100%;
width: 100%;
}
.currentWordNumber {
position: absolute;
right: 26rpx;
bottom: 8rpx;
color: #CCCCCC;
}
}
}
.footer-btn {
position: fixed;
left: 0;
width: 100%;
bottom: 0;
min-height: 100rpx;
background: #FFFFFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-weight: 500;
z-index: 99;
.btn {
margin: 16rpx 32rpx;
width: calc(100% - 64rpx);
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #2C66F7;
border-radius: 24rpx;
font-size: 32rpx;
color: #FFFFFF;
font-weight: 500;
}
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
<glsx-privacy appletName="嘀加门店管理助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar
bindnavbarReady="navbarReady"
class="navigation-header"
showBack="{{true}}"
bindback="back"
navStyle="background-color: transparent;box-shadow:none;"
>
<view class="page-title">{{ pageTitle }}</view>
</navigation-bar>
<scroll-view
class="container"
scroll-y
show-scrollbar="{{false}}"
enhanced
style="padding-top: calc({{navBarHeight}}px + 8rpx);padding-bottom: {{ readonly ? '0' : (isFullSucreen ? 'calc(120rpx + 34px)' : '120rpx') }};"
>
<view style="width: 100%;height: 8rpx;"></view>
<view class="box padding-0">
<view class="item-box" bindtap="openbizType">
<view class="label">任务类型<text class="required">*</text></view>
<view class="value">
<text wx:if="{{ form.categoryName }}" class="value-text">{{ form.categoryName }}</text>
<text wx:else class="placeholder">点击选择</text>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="" />
</view>
</view>
<view class="item-box" bindtap="openMerchant">
<view class="label">归属门店<text class="required">*</text></view>
<view class="value">
<text wx:if="{{ form.merchantName }}" class="value-text">{{ form.merchantName }}</text>
<text wx:else class="placeholder">点击选择</text>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="" />
</view>
</view>
<view class="item-box">
<view class="label">归属业务<text class="required">*</text></view>
<view class="value_box">
<view class="radio-box" wx:for="{{ businessList }}" wx:key="value" bindtap="changeBusiness" data-value="{{ item.value }}">
<image wx:if="{{ form.businessType == item.value }}" class="radio-icon" src="{{IMG_URL}}radio-checked.png" mode="" />
<view wx:else class="circle" style="background: {{readonly ? '#EEE' : ''}};"></view>
<view class="text">{{ item.label }}</view>
</view>
</view>
</view>
<view class="multi-select" wx:if="{{ form.bizType == 'staff-replace-access' }}">
<view class="multi-select__header">
<view class="multi-select__label">问题驻店销售<text class="required">*</text></view>
<view bindtap="openProblemSales" style="display: flex;align-items: center;">
<text class="multi-placeholder" wx:if="{{ !readonly }}">点击选择(可多选)</text>
<image class="multi-select__arrow" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="aspectFit" />
</view>
</view>
<view class="multi-select__body" wx:if="{{ form.problemStaffList && form.problemStaffList.length }}">
<view class="multi-tags">
<block wx:for="{{ form.problemStaffList }}" wx:key="phone">
<view class="multi-tag">
<text class="multi-tag__text" style="max-width: {{ readonly ? '100%' : 'calc(100% - 36rpx)'}};">{{ item.name || item.staffName || item.participantName || '-' }}</text>
<text class="multi-tag__close" wx:if="{{ !readonly }}" catchtap="removeProblemSales" data-index="{{ index }}">×</text>
</view>
</block>
</view>
</view>
</view>
<view class="item-box" bindtap="openOperator">
<view class="label">指定区域运营<text class="required">*</text></view>
<view class="value">
<text wx:if="{{ form.regionOperatorName }}" class="value-text">{{ form.regionOperatorName }}</text>
<text wx:else class="placeholder">点击选择</text>
<image src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/arrow.png" mode="" />
</view>
</view>
<view class="item-box remark_box">
<view class="label">任务事项描述<text class="required">*</text></view>
<view class="textArea_box">
<textarea
placeholder-style="color: #999EA8;"
disabled="{{ readonly }}"
value="{{ form.description }}"
maxlength="500"
placeholder="请输入"
class="textarea"
bindinput="descriptionInput"
/>
<view class="currentWordNumber">{{ descriptionLength || 0 }} / 500</view>
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;background: transparent;"></view>
</scroll-view>
<view class="footer-btn {{ isFullSucreen?'isFullSucreen-btn':'' }}" wx:if="{{ !readonly }}">
<view class="btn" bindtap="submit">提交</view>
</view>
<select-popup
show="{{ showSelectPopup }}"
options="{{ selectOptions }}"
multiple="{{ selectMultiple }}"
values="{{ selectValues }}"
value="{{ selectValue }}"
bindconfirm="handlePopupConfirm"
bindcancel="hideSelectPopup"
labelKey="{{ labelKey }}"
valueKey="{{ valueKey }}"
height="{{ selectPopupHeight }}"
title="{{ selectTitle }}"
allowSearch="{{ allowSearch }}"
/>
......@@ -90,6 +90,7 @@ Component({
metrics: [],
sortKey: '',
sortOrder: 'desc',
keyword: '',
displayList: [],
dotMaps: {
0: 'red',
......@@ -111,6 +112,18 @@ Component({
},
methods: {
input(e) {
let { value } = e.detail
this.setData({ keyword: value })
},
search() {
this.applySearch()
},
clear() {
this.setData({keyword: ''}, () => {
this.applySearch()
})
},
initLoad() {
let { mode } = this.data
this.setData({
......@@ -128,7 +141,7 @@ Component({
const sortOrder = this.data.sortOrder || this.data.initialSortOrder || 'desc'
const metrics = cfg.metrics || []
const metricWidth = `${(100 / Math.max(1, metrics.length)).toFixed(2)}%`
const displayList = this.buildDisplayList(this.properties.employeeList, metrics)
const displayList = this.buildDisplayList(this.getFilteredEmployeeList(this.properties.employeeList), metrics)
this.setData(
{
sortOptions: cfg.sortOptions || [],
......@@ -171,7 +184,7 @@ Component({
onTapEmployee(e) {
if (this.data.scene == 0) return // 全业务不支持跳转详情
const idx = e.currentTarget?.dataset?.index
const employee = Array.isArray(this.properties.employeeList) ? this.properties.employeeList[idx] : null
const employee = Array.isArray(this.data.displayList) ? this.data.displayList[idx] : null
this.triggerEvent('employeeTap', { employee })
},
......@@ -194,5 +207,21 @@ Component({
}
})
},
applySearch() {
const metrics = Array.isArray(this.data.metrics) ? this.data.metrics : this.getConfig().metrics || []
const displayList = this.buildDisplayList(this.getFilteredEmployeeList(this.properties.employeeList), metrics)
this.setData({ displayList })
},
getFilteredEmployeeList(employeeList) {
if (!Array.isArray(employeeList)) return []
const keyword = String(this.data.keyword || '').trim()
if (!keyword) return employeeList
return employeeList.filter((emp) => {
const name = String(emp?.employeeName || '').trim()
return name.includes(keyword)
})
},
}
})
......@@ -88,7 +88,45 @@
color: #2c66f7;
}
}
}
}
.search-box {
width: 100%;
padding-top: 16rpx;
display: flex;
align-items: center;
background-color: #fff;
box-sizing: border-box;
.search-input {
background: #F3F3F4;
border-radius: 38rpx;
width: 100%;
height: 72rpx;
display: flex;
align-items: center;
.search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-clear {
width: 36rpx;
height: 36rpx;
margin: 0 26rpx 0 10rpx;
}
.input {
font-size: 28rpx;
width: calc(100% - 136rpx);
height: 38rpx;
line-height: 38rpx;
}
}
}
.search-box .search-input
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.list {
padding: 8rpx 0 16rpx;
......
......@@ -23,6 +23,15 @@
</block>
</view>
</scroll-view>
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="搜索" class="input" value="{{keyword}}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
</view>
<view class="list" wx:if="{{displayList.length}}">
<block wx:for="{{displayList}}" wx:key="employeeId" wx:for-index="index">
<view class="card" bindtap="onTapEmployee" data-index="{{index}}">
......
......@@ -246,6 +246,10 @@ Page({
},
getEmployeeRank(noAI) {
let { tabIndex, sceneTabIndex, startStr, endStr, sortField, sortOrder, timeDimension } = this.data
const sortComp = this.selectComponent('#employee-ranking')
if (sortComp) {
sortComp.clear()
}
this.setData({
employeeList: []
})
......
import api from "~/api/index/index";
import dayjs from "dayjs";
const IMG_URL = "https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/";
let timeoutId;
Page({
/**
* 页面的初始数据
......@@ -33,15 +34,23 @@ Page({
tabList: [
{
text: "每日任务",
count: 0,
key: "dailyCount",
},
{
text: "本周任务",
count: 0,
key: "weeklyCount",
},
{
text: "月度任务",
count: 0,
key: "monthlyCount",
},
{
text: "专项任务",
count: 0,
key: "specialCount",
},
],
tabIndex: 0,
......@@ -57,9 +66,13 @@ Page({
1: { name: "本周复盘" },
2: { name: "督导月度计划" },
4: { name: "专项任务" },
6: { name: "提报优秀案例录音" },
7: { name: "带教要求" },
},
list: [],
scrollTop: 0,
showIcon1: true,
subTabIndex: 1,
},
onTabItemTap(e) {
// 点击埋点
......@@ -83,6 +96,21 @@ Page({
isSticky: res[0].top <= navBarHeight,
});
});
// 滚动时隐藏第一个图标,显示第二个图标
this.setData({
showIcon1: false,
});
// 清除之前的定时器
if (timeoutId) {
clearTimeout(timeoutId);
}
// 设置一个定时器,在滚动停止后一定时间后恢复两个图标的显示状态
timeoutId = setTimeout(() => {
this.setData({
showIcon1: true,
});
}, 1000); // 在这里设置等待的时间,单位是毫秒
},
/**
* 生命周期函数--监听页面加载
......@@ -90,6 +118,7 @@ Page({
onLoad: function (options) {
let userInfo = wx.$util.getUserInfo();
this.setData({ userInfo });
this.getTabData(true);
},
/**
* 生命周期函数--监听页面初次渲染完成
......@@ -99,6 +128,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
this.getTabData();
this.getStaticData();
this.setData(
{
......@@ -112,6 +142,43 @@ Page({
},
);
},
getTabData(loadFlag) {
let { tabIndex, tabList, startStr, endStr } = this.data;
let userInfo = wx.$util.getUserInfo();
let params = {
supervisorPhone: userInfo?.phone,
startDate: loadFlag ? undefined : startStr,
endDate: loadFlag ? undefined : endStr,
};
api.getTaskTabData(params).then((res) => {
let { code, data, message } = res;
if (code == 0) {
if (loadFlag) {
tabList?.forEach((val) => {
val.count = data[val.key] > 99 ? "99+" : data[val.key];
});
this.setData({
tabList,
});
} else {
// 仅更新当前选中tab数量
let key = tabList[tabIndex].key;
this.setData({
[`tabList[${tabIndex}].count`]: data[key] > 99 ? "99+" : data[key],
});
}
} else {
wx.$util.showToast(message);
}
});
},
handleMentoring() {
wx.$track.setTrackData(0, `supervisor_start_mentoring_index`, {}, "");
wx.navigateTo({
url: `/packageCrew/pages/mentoring/mentoring`,
});
},
formatThousands(v) {
const s = String(v);
......@@ -124,6 +191,22 @@ Page({
return isNeg ? `-${res}` : res;
},
toDateTimeStart(dateStr) {
if (!dateStr) return undefined;
const s = String(dateStr).trim();
if (!s) return undefined;
if (s.includes(":")) return s;
return `${s} 00:00:00`;
},
toDateTimeEnd(dateStr) {
if (!dateStr) return undefined;
const s = String(dateStr).trim();
if (!s) return undefined;
if (s.includes(":")) return s;
return `${s} 23:59:59`;
},
getStaticData() {
api.getSupervisorStaticData({}).then((res) => {
let { code, data, message } = res;
......@@ -152,9 +235,42 @@ Page({
let eventCode = ["supervisor_dayTask_tab", "supervisor_weeklyTask_tab", "supervisor_monthlyTask_tab", "supervisor_specificTask_tab"];
// 点击埋点
wx.$track.setTrackData(0, eventCode[e.detail], {}, "");
this.setData({
tabIndex: e.detail,
});
const nextTabIndex = e.detail;
const nextSubTabIndex = nextTabIndex === 3 ? this.data.subTabIndex : 0;
this.setData(
{
tabIndex: nextTabIndex,
subTabIndex: nextSubTabIndex,
list: [],
pageNum: 1,
flag: false,
nothing: false,
total: 0,
},
() => {
this.getList(true);
this.getTabData();
},
);
},
switchSpecialCenter(e) {
const idx = Number(e.currentTarget?.dataset?.index);
if (Number.isNaN(idx)) return;
if (idx === this.data.subTabIndex) return;
this.setData(
{
subTabIndex: idx,
list: [],
pageNum: 1,
flag: false,
nothing: false,
total: 0,
},
() => {
this.getList(true);
},
);
},
jump(e) {
......@@ -166,6 +282,8 @@ Page({
1: "/packageIndex/pages/weeklyReview/weeklyReview",
2: "/packageIndex/pages/monthlyPlan/monthlyPlan",
4: "/packageIndex/pages/specialTask/specialTask",
6: "/packageIndex/pages/caseAudioList/caseAudioList",
7: "/packageIndex/pages/mentorRequirements/mentorRequirements",
};
const eventCode = {
3: { view: "supervisor_recording_view", execute: "supervisor_recording_execute" },
......@@ -174,15 +292,27 @@ Page({
1: { view: "supervisor_weeklyReview_view", execute: "supervisor_weeklyReview_execute" },
2: { view: "supervisor_monthlyPlan_view", execute: "supervisor_monthlyPlan_execute" },
4: { view: "supervisor_specificTask_view", execute: "supervisor_specificTask_execute" },
6: { view: "supervisor_caseAudioList_view", execute: "supervisor_caseAudioList_view" },
7: { view: "supervisor_mentorRequirements_view", execute: "supervisor_mentorRequirements_view" },
};
let status = target.taskStatus != 2 ? "execute" : "view";
console.log(eventCode[target.taskType][status]);
wx.$track.setTrackData(0, eventCode[target.taskType][status], {}, "");
wx.navigateTo({
url: `${pageUrl[target.taskType]}?taskStatus=${target.taskStatus}&id=${target.id}`,
});
},
// 专项带教
jumpTaskCenter(e) {
const { target } = e.currentTarget.dataset || {};
if (!target) return;
const taskStatus = target.taskStatus;
const qs = `taskId=${encodeURIComponent(target.taskId)}${taskStatus === null || taskStatus === undefined ? "" : `&taskStatus=${encodeURIComponent(taskStatus)}`}`;
wx.navigateTo({
url: `/packageCrew/pages/specialMentoring/specialMentoring?${qs}`,
});
},
search(e) {
this.setData(
{
......@@ -195,6 +325,7 @@ Page({
},
() => {
this.getList(true);
this.getTabData();
},
);
},
......@@ -205,18 +336,28 @@ Page({
// 获取列表数据
getList(repload) {
let { pageNum, nothing, startStr, endStr, tabIndex, topBoxHeight, scrollTop } = this.data;
let { pageNum, nothing, startStr, endStr, tabIndex, topBoxHeight, scrollTop, subTabIndex } = this.data;
if (nothing) return;
const taskList = [[0, 3, 5], [1], [2], [4]];
const taskList = [[0, 3, 5], [6, 7], [2], [4]];
wx.$util.showLoading();
let params = {
taskTypeList: taskList[tabIndex],
startDate: startStr,
endDate: endStr,
pageNum,
pageSize: 10,
};
api.getMissionList(params).then((res) => {
let params =
tabIndex == 3 && subTabIndex == 0
? {
pageNum,
pageSize: 10,
bizType: "spec-coach",
startDate: startStr,
endDate: endStr,
}
: {
taskTypeList: taskList[tabIndex],
startDate: startStr,
endDate: endStr,
pageNum,
pageSize: 10,
};
let requestEvent = tabIndex == 3 && subTabIndex == 0 ? "getTaskCenterPageData" : "getMissionList";
api[requestEvent](params).then((res) => {
wx.$util.hideLoading();
let total = 0;
let list = [];
......@@ -224,6 +365,10 @@ Page({
data?.list?.forEach((val) => {
val.updatedDate = val.updatedDate ? dayjs(val.updatedDate).format("YYYY-MM-DD HH:mm:ss") : "";
val.createTime = val.createTime ? dayjs(val.createTime).format("YYYY-MM-DD HH:mm:ss") : "";
if (tabIndex == 3 && subTabIndex == 0) {
val.taskStatus = val.status === 'UNFINISHED' ? 0 : 2
if (val.completeTime) val.completeTime = dayjs(val.completeTime).format("YYYY-MM-DD HH:mm:ss")
}
});
if (code == 0) {
list = data.list;
......
......@@ -73,12 +73,53 @@ page {
}
}
}
.count-row {
display: flex;
align-items: center;
justify-content: space-between;
background: #F2F3F7;
padding: 16rpx 24rpx;
}
.number {
height: 30rpx;
font-size: 24rpx;
color: #999999;
background: #F2F3F7;
padding: 16rpx 24rpx;
}
.sub-tab {
display: flex;
align-items: center;
gap: 24rpx;
padding: 8rpx;
border-radius: 16rpx;
background: #FFFFFF;
}
.center-switch {
display: flex;
align-items: center;
padding: 4rpx 8rpx;
border-radius: 8rpx;
&.active {
background: #E7EDFE;
}
}
.center-switch__text {
font-size: 26rpx;
color: #292D33;
&.active {
color: #2C66F7;
font-weight: 600;
}
}
.center-switch__icon {
font-size: 26rpx;
color: #BEC1C7;
line-height: 1;
margin: 0 6rpx;
}
.content-box {
padding: 0 24rpx;
......@@ -179,4 +220,57 @@ page {
}
}
}
}
\ No newline at end of file
}
.add-btn-box {
width: 260rpx;
height: 96rpx;
border-radius: 48rpx;
opacity: 1;
background: #2C66F7;
position: fixed;
bottom: 32rpx;
right: 20rpx;
font-size: 24rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
.addBtn {
width: 260rpx;
height: 96rpx;
border-radius: 48rpx;
opacity: 1;
background: #2C66F7;
position: fixed;
bottom: 32rpx;
right: 20rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
.btn-text {
margin-left: 20rpx;
}
}
.arrowIcon {
width: 32rpx;
height: 96rpx;
opacity: 1;
position: fixed;
bottom: 32rpx;
right: 0;
border-radius: 16rpx 0 0 16rpx;
background: #2C66F7;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
display: flex;
align-items: center;
justify-content: center;
.image {
width: 32rpx;
height: 32rpx;
}
}
......@@ -44,6 +44,7 @@
<view class="sticky-box {{ isSticky ? 'is-sticky' : '' }}">
<view class="tab-box">
<tab-bar tabList="{{ tabList }}"
badge="{{ true }}"
bind:click="tabClick"
activeIndex="{{ tabIndex }}" />
</view>
......@@ -52,8 +53,23 @@
isSticky="{{ isSticky }}"
bind:search="search"></date-screen>
</view>
<view class="number">
共{{ total || 0 }}条任务
<view class="count-row">
<view class="number">
共{{ total || 0 }}条任务
</view>
<view class="sub-tab" wx:if="{{ tabIndex == 3 }}">
<view class="center-switch {{ subTabIndex == 0 ? 'active' : '' }}"
catchtap="switchSpecialCenter"
data-index="0">
<text class="center-switch__text {{ subTabIndex == 0 ? 'active' : '' }}">任务中心</text>
</view>
<text class="center-switch__icon">⇄</text>
<view class="center-switch {{ subTabIndex == 1 ? 'active' : '' }}"
catchtap="switchSpecialCenter"
data-index="1">
<text class="center-switch__text {{ subTabIndex == 1 ? 'active' : '' }}">策略中心</text>
</view>
</view>
</view>
</view>
<view class="content-box">
......@@ -65,104 +81,141 @@
wx:key="sIndex">
<block wx:for="{{ val }}" wx:key="index">
<view class="item content">
<!-- 顶部状态和标题 -->
<view class="item-top">
<view class="status text-center"
style="color: {{ statusMap[item.taskStatus].color }}; background-color: {{ statusMap[item.taskStatus].background }};">
{{ statusMap[item.taskStatus].name }}
</view>
<view class="name" wx:if="{{ item.taskType != 4 }}">
{{ missionMap[item.taskType].name }}<text wx:if="{{ item.taskType == 5 }}">-{{ item.storeManagerName || '-' }}</text>
</view>
<view class="name" wx:else>
{{ item.merchantName || '-' }}
</view>
</view>
<view wx:if="{{ (item.taskType == 0 || item.taskType == 1 || item.taskType == 2) && item.taskStatus == 2 }}"
class="list-item">
<image class="icon"
src="{{ IMG_URL }}task-icon.png"
mode="" />
<view class="label">
{{ ['日报内容:', '复盘内容:', '月度计划:'][item.taskType] }}
</view>
<view class="text-hide">
{{ item.taskContext || '-' }}
<block wx:if="{{ tabIndex == 3 && subTabIndex == 0 }}">
<view class="item-top">
<view class="status text-center"
style="color: {{ statusMap[item.taskStatus].color }}; background-color: {{ statusMap[item.taskStatus].background }};">
{{ statusMap[item.taskStatus].name }}
</view>
<view class="name">
专项带教
</view>
</view>
</view>
<block wx:if="{{ item.taskType == 4 }}">
<view class="list-item">
<image class="icon"
src="{{ IMG_URL }}matter-icon.png"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
事项描述:
完成时间:
</view>
<view wx:if="{{ item.taskStatus == 2 }}">
{{ item.completeTime || '-' }}
</view>
<view class="text-hide">
{{ item.taskDesc || '-' }}
<view wx:else>
-
</view>
</view>
<view wx:if="{{ item.taskStatus == 2 }}" class="list-item">
<image class="icon"
src="{{ IMG_URL }}task-icon.png"
mode="" />
<view class="label">
专项任务:
<view class="btn-box">
<view bindtap="jumpTaskCenter"
data-target="{{ item }}"
class="btn {{ item.taskStatus == 2 ? '' : 'primary' }}">
{{ item.taskStatus == 2 ? '查看' : '去执行' }}
</view>
</view>
</block>
<block wx:else>
<!-- 顶部状态和标题 -->
<view class="item-top">
<view class="status text-center"
style="color: {{ statusMap[item.taskStatus].color }}; background-color: {{ statusMap[item.taskStatus].background }};">
{{ statusMap[item.taskStatus].name }}
</view>
<view class="text-hide">
{{ item.taskContext || '-' }}
<view class="name" wx:if="{{ item.taskType != 4 }}">
{{ missionMap[item.taskType].name }}<text wx:if="{{ item.taskType == 5 }}"></text>
</view>
<view class="name" wx:else>
{{ item.merchantName || '-' }}
</view>
</view>
<view wx:else class="list-item">
<block wx:if="{{ item.taskType == 4 }}">
<view class="list-item">
<image class="icon"
src="{{ IMG_URL }}matter-icon.png"
mode="" />
<view class="label">
事项描述:
</view>
<view class="text-hide">
{{ item.taskDesc || '-' }}
</view>
</view>
<view wx:if="{{ item.taskStatus == 2 }}" class="list-item">
<image class="icon"
src="{{ IMG_URL }}task-icon.png"
mode="" />
<view class="label">
专项任务:
</view>
<view class="text-hide">
{{ item.taskContext || '-' }}
</view>
</view>
<view wx:else class="list-item">
<image class="icon"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
创建时间:
</view>
<view>
{{ item.createTime || '-' }}
</view>
</view>
</block>
<view wx:if="{{ item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2) }}"
class="list-item">
<image class="icon"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
创建时间:
完成时间:
</view>
<view>
{{ item.createTime || '-' }}
<view wx:if="{{ item.taskStatus == 2 }}">
{{ item.updatedDate || '-' }}
</view>
<view wx:else>
-
</view>
</view>
</block>
<view wx:if="{{ item.taskType != 4 || (item.taskType == 4 && item.taskStatus == 2) }}"
class="list-item">
<image class="icon"
src="{{ IMG_URL }}time-icon.png"
mode="" />
<view class="label">
完成时间:
</view>
<view>
{{ item.updatedDate || '-' }}
<!-- 录音复盘任务进度 -->
<view wx:if="{{ item.taskType == 3 }}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view class="progress-item"
style="width: {{ (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }}"></view>
<view class="num">
{{ item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount }}
</view>
</view>
</view>
</view>
<view wx:if="{{ item.taskType == 3 }}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view class="progress-item"
style="width: {{ (item.audioReviewCompletedCount / item.audioReviewTotalCount * 100) + '%' }}"></view>
<view class="num">
{{ item.audioReviewCompletedCount + '/' + item.audioReviewTotalCount }}
<!-- 提报优秀案例录音/带教要求任务进度 -->
<view wx:if="{{ item.taskType == 6 || item.taskType == 7 }}" class="list-item">
<view class="progress">
<view class="progress-line"></view>
<view class="progress-item"
style="width: {{ (item.weeklyTaskCompletedCount / item.weeklyTaskTotalCount * 100) + '%' }};"></view>
<view class="num">
{{ item.weeklyTaskCompletedCount + '/' + item.weeklyTaskTotalCount }}
</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<view class="btn-box">
<view bindtap="jump"
data-target="{{ item }}"
class="btn {{ item.taskStatus == 2 ? '' : 'primary' }}">
{{ item.taskStatus == 2 ? '查看' : '去执行' }}
<!-- 底部按钮 -->
<view class="btn-box">
<view bindtap="jump"
data-target="{{ item }}"
class="btn {{ item.taskStatus == 2 ? '' : 'primary' }}">
{{ item.taskStatus == 2 ? '查看' : '去执行' }}
</view>
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">
到底了~
</view>
</block>
</block>
<block wx:if="{{ nothing }}">
<view class="list-nothing">
到底了~
</view>
</block>
<block wx:else>
<empty-data />
......@@ -171,3 +224,21 @@
</view>
</view>
</scroll-view>
<block wx:if="{{ tabIndex == 0 }}">
<block wx:if="{{ showIcon1 }}">
<view class="add-btn-box" bindtap="handleMentoring">
<view class="addBtn">
<van-icon name="plus" />
<view class="btn-text">
带教记录
</view>
</view>
</view>
</block>
<block wx:else>
<view class="arrowIcon">
<image class="image"
src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/usedCar/arrow-right.png" />
</view>
</block>
</block>
......@@ -12,6 +12,11 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);box-shadow:none;',
isForbidden: false
},
goMySpecialTask() {
wx.navigateTo({
url: '/packageIndex/pages/mySpecialTaskList/mySpecialTaskList'
})
},
jump(e) {
let {
url
......@@ -109,4 +114,4 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () { },
})
\ No newline at end of file
})
......@@ -19,12 +19,20 @@
</view>
</view>
<view class="set_box">
<view class="set_item" bindtap="goMySpecialTask">
<image class="icon" src="https://img02.glsx.com.cn/weapp/resource/miniprogram/supervisor-miniprogram/special-task-icon.png" mode=""/>
<view class="right">
<view class="title">我发起的专项任务</view>
<view class="set_tips"></view>
<image class="icon_image" src="{{IMG_URL}}arrow-left.png" mode="" />
</view>
</view>
<view class="set_item " bindtap="jump" data-url="agreement">
<image class="icon" src="{{IMG_URL}}user-agreement.png" mode=""/>
<view class="right">
<view class="title">用户协议</view>
<view class="set_tips"></view>
<image class="icon_image" src="./images/right.png" mode="" />
<image class="icon_image" src="{{IMG_URL}}arrow-left.png" mode="" />
</view>
</view>
<view class="set_item " bindtap="jump" data-url="privacy">
......@@ -32,7 +40,7 @@
<view class="right">
<view class="title">隐私协议</view>
<view class="set_tips"></view>
<image class="icon_image" src="./images/right.png" mode="" />
<image class="icon_image" src="{{IMG_URL}}arrow-left.png" mode="" />
</view>
</view>
<!-- <view class="set_item " bindtap="goVersionPage">
......
......@@ -319,7 +319,7 @@ Page({
wx.hideLoading()
wx.showModal({
title: '提示',
content: code == '30990103' || code == '30990105' ? '抱歉,你没有飞行督导角色权限' : message,
content: code == '30990103' || code == '30990105' ? '抱歉,你没有督导角色权限' : message,
showCancel: false,
confirmText: '知道了',
confirmColor: '#2C66F7'
......
......@@ -266,7 +266,8 @@ export const checkScene = options => {
'recruitDetail': 'packageEquity/pages/recruitManage/recruitDetail/recruitDetail',
'performanceRate': 'packageWorkspace/pages/performanceRating/rateList/retaList',
'validReferralCount': 'packageWorkspace/pages/validReferralCount/referralCountList/referralCountList',
'orderApprovalDetail': '/packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail'
'orderApprovalDetail': '/packageWorkspace/pages/orderApprovalManage/orderApprovalDetail/orderApprovalDetail',
'supervisorIndex': 'pages/tab/index/index'
}
options.path = pagePath[query.page]
}
......
......@@ -138,7 +138,7 @@ class TRACK {
loginAccount: accountName,
uuid,
userType,
systemSource: 7,
systemSource: 8,
eventTime: new Date().format('yyyy-MM-dd hh:mm:ss'),
eventType,
prePagePath: prePagePath ? prePagePath.route : '/',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!