完善店务员工工时与订单记录
This commit is contained in:
+1
-1
@@ -221,7 +221,7 @@ public class AdminManagerController {
|
|||||||
return Result.success(nailArtistInfoService.getAllNailArtists());
|
return Result.success(nailArtistInfoService.getAllNailArtists());
|
||||||
}
|
}
|
||||||
Long shopId = adminScopeHelper.resolveShopScope(currentUser, null);
|
Long shopId = adminScopeHelper.resolveShopScope(currentUser, null);
|
||||||
return Result.success(nailArtistInfoService.getByShopId(shopId));
|
return Result.success(nailArtistInfoService.getManageableByShopId(shopId, currentUser.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/employees/{userId}")
|
@GetMapping("/employees/{userId}")
|
||||||
|
|||||||
+4
-2
@@ -539,18 +539,20 @@ class AdminManagerControllerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void employeesShouldReturnScopedArtistsForNonPlatformUser() {
|
void employeesShouldReturnManageableArtistsForNonPlatformUser() {
|
||||||
MockHttpServletRequest request = new MockHttpServletRequest();
|
MockHttpServletRequest request = new MockHttpServletRequest();
|
||||||
UserDO manager = new UserDO();
|
UserDO manager = new UserDO();
|
||||||
|
manager.setId(5L);
|
||||||
List<NailArtistInfoDTO> artists = List.of(new NailArtistInfoDTO());
|
List<NailArtistInfoDTO> artists = List.of(new NailArtistInfoDTO());
|
||||||
when(adminScopeHelper.getCurrentUser(request)).thenReturn(manager);
|
when(adminScopeHelper.getCurrentUser(request)).thenReturn(manager);
|
||||||
when(adminScopeHelper.isPlatformAdmin(manager)).thenReturn(false);
|
when(adminScopeHelper.isPlatformAdmin(manager)).thenReturn(false);
|
||||||
when(adminScopeHelper.resolveShopScope(manager, null)).thenReturn(8L);
|
when(adminScopeHelper.resolveShopScope(manager, null)).thenReturn(8L);
|
||||||
when(nailArtistInfoService.getByShopId(8L)).thenReturn(artists);
|
when(nailArtistInfoService.getManageableByShopId(8L, 5L)).thenReturn(artists);
|
||||||
|
|
||||||
Result<List<NailArtistInfoDTO>> result = controller.employees(request);
|
Result<List<NailArtistInfoDTO>> result = controller.employees(request);
|
||||||
|
|
||||||
assertThat(result.getData()).isSameAs(artists);
|
assertThat(result.getData()).isSameAs(artists);
|
||||||
|
verify(nailArtistInfoService).getManageableByShopId(8L, 5L);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
const employeesApi = require('../../api/employees')
|
const employeesApi = require('../../api/employees')
|
||||||
|
|
||||||
const EMPLOYEE_COLORS = ['#7AA9C2', '#8EB99B', '#BDA7D8', '#D7B17D', '#D98D8D']
|
const EMPLOYEE_COLORS = ['#7AA9C2', '#8EB99B', '#BDA7D8', '#D7B17D', '#D98D8D']
|
||||||
|
const EMPTY_FIELD_TEXT = '未填写'
|
||||||
|
|
||||||
|
function displayText(value) {
|
||||||
|
const text = String(value || '').trim()
|
||||||
|
return text || EMPTY_FIELD_TEXT
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildRoleText(data) {
|
||||||
|
return Number(data.type) === 2 ? '店长' : '店员'
|
||||||
|
}
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
@@ -34,6 +44,12 @@ Page({
|
|||||||
name,
|
name,
|
||||||
shortName: name.slice(-1),
|
shortName: name.slice(-1),
|
||||||
color: data.color || EMPLOYEE_COLORS[0],
|
color: data.color || EMPLOYEE_COLORS[0],
|
||||||
|
roleText: buildRoleText(data),
|
||||||
|
accountText: displayText(data.account),
|
||||||
|
phoneText: displayText(data.phone),
|
||||||
|
contactPhoneText: displayText(data.contactPhone),
|
||||||
|
wechatIdText: displayText(data.wechatId),
|
||||||
|
identityText: displayText(data.identity),
|
||||||
monthOrders,
|
monthOrders,
|
||||||
monthAmount,
|
monthAmount,
|
||||||
avgAmount: monthOrders > 0 ? Math.round(monthAmount / monthOrders) : 0
|
avgAmount: monthOrders > 0 ? Math.round(monthAmount / monthOrders) : 0
|
||||||
|
|||||||
@@ -11,7 +11,10 @@
|
|||||||
<view wx:else class="avatar" style="background: {{employee.color}};">{{employee.shortName}}</view>
|
<view wx:else class="avatar" style="background: {{employee.color}};">{{employee.shortName}}</view>
|
||||||
<view>
|
<view>
|
||||||
<text class="employee-name">{{employee.name}}</text>
|
<text class="employee-name">{{employee.name}}</text>
|
||||||
<text class="tag" style="background: {{employee.color}}; color: #fff;">员工色</text>
|
<view class="head-tag-row">
|
||||||
|
<text class="tag" style="background: {{employee.color}}; color: #fff;">{{employee.roleText}}</text>
|
||||||
|
<text class="tag ghost">员工色</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -30,10 +33,44 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view wx:if="{{!loadError}}" class="section">
|
||||||
|
<view class="section-title">基础信息</view>
|
||||||
|
<view class="card info-card">
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">姓名</text>
|
||||||
|
<text class="info-value">{{employee.name}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">角色</text>
|
||||||
|
<text class="info-value">{{employee.roleText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">登录账号</text>
|
||||||
|
<text class="info-value">{{employee.accountText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">手机号</text>
|
||||||
|
<text class="info-value">{{employee.phoneText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">联系电话</text>
|
||||||
|
<text class="info-value">{{employee.contactPhoneText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">微信号</text>
|
||||||
|
<text class="info-value">{{employee.wechatIdText}}</text>
|
||||||
|
</view>
|
||||||
|
<view class="info-row">
|
||||||
|
<text class="info-label">身份</text>
|
||||||
|
<text class="info-value">{{employee.identityText}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view wx:if="{{!loadError}}" class="section">
|
<view wx:if="{{!loadError}}" class="section">
|
||||||
<view class="menu-grid">
|
<view class="menu-grid">
|
||||||
<view class="card menu-card" data-url="/pages/schedule-setting/index" bindtap="go">排班设置</view>
|
<view class="card menu-card" data-url="/pages/schedule-setting/index" bindtap="go">排班设置</view>
|
||||||
<view class="card menu-card" data-url="/pages/leave-management/index" bindtap="go">请假管理</view>
|
<view class="card menu-card" data-url="/pages/leave-management/index" bindtap="go">工时管理</view>
|
||||||
<view class="card menu-card" data-url="/pages/color-setting/index" bindtap="go">颜色设置</view>
|
<view class="card menu-card" data-url="/pages/color-setting/index" bindtap="go">颜色设置</view>
|
||||||
<view class="card menu-card" data-url="/pages/employee-orders/index" bindtap="go">订单记录</view>
|
<view class="card menu-card" data-url="/pages/employee-orders/index" bindtap="go">订单记录</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -41,6 +41,18 @@
|
|||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.head-tag-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag.ghost {
|
||||||
|
background: #f2ede7;
|
||||||
|
color: #7b7168;
|
||||||
|
}
|
||||||
|
|
||||||
.stats {
|
.stats {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
@@ -68,6 +80,45 @@
|
|||||||
font-size: 20rpx;
|
font-size: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-card {
|
||||||
|
padding: 8rpx 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 24rpx;
|
||||||
|
padding: 22rpx 0;
|
||||||
|
border-bottom: 1rpx solid #eee8df;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-row:last-child {
|
||||||
|
border-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label,
|
||||||
|
.info-value {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
color: #91897f;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
color: #302c27;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 800;
|
||||||
|
overflow-wrap: anywhere;
|
||||||
|
}
|
||||||
|
|
||||||
.menu-grid {
|
.menu-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ function orderAmount(item) {
|
|||||||
function toOrderRow(item, index) {
|
function toOrderRow(item, index) {
|
||||||
return {
|
return {
|
||||||
id: item.orderItemId || index,
|
id: item.orderItemId || index,
|
||||||
|
detailId: item.orderItemId || item.id || '',
|
||||||
date: item.date || shortDate(item.startTime),
|
date: item.date || shortDate(item.startTime),
|
||||||
project: item.productTitle || '预约作品',
|
project: item.productTitle || '预约作品',
|
||||||
customer: item.customerName || '到店客户',
|
customer: item.customerName || '到店客户',
|
||||||
@@ -80,5 +81,14 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
openOrder(event) {
|
||||||
|
const id = event.currentTarget.dataset.id
|
||||||
|
if (!id) {
|
||||||
|
wx.showToast({ title: '订单项ID不能为空', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
wx.navigateTo({ url: `/pages/appointment-detail/index?id=${id}` })
|
||||||
|
},
|
||||||
|
|
||||||
back() { wx.navigateBack() }
|
back() { wx.navigateBack() }
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<view wx:elif="{{loadError}}" class="empty card error">{{loadError}}</view>
|
<view wx:elif="{{loadError}}" class="empty card error">{{loadError}}</view>
|
||||||
<view wx:elif="{{orders.length === 0}}" class="empty card">当前日期范围内没有订单</view>
|
<view wx:elif="{{orders.length === 0}}" class="empty card">当前日期范围内没有订单</view>
|
||||||
<view wx:else class="list">
|
<view wx:else class="list">
|
||||||
<view wx:for="{{orders}}" wx:key="id" class="card list-card order-row">
|
<view wx:for="{{orders}}" wx:key="id" class="card list-card order-row" data-id="{{item.detailId}}" bindtap="openOrder">
|
||||||
<view>
|
<view>
|
||||||
<text class="order-title">{{item.project}}</text>
|
<text class="order-title">{{item.project}}</text>
|
||||||
<text class="muted">{{item.date}} · {{item.customer}}</text>
|
<text class="muted">{{item.date}} · {{item.customer}}</text>
|
||||||
|
|||||||
@@ -11,8 +11,29 @@ function buildScheduleSummary(item) {
|
|||||||
return time ? `${mode} ${time}` : mode
|
return time ? `${mode} ${time}` : mode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildRoleText(item) {
|
||||||
|
return Number(item.type) === 2 ? '店长' : '店员'
|
||||||
|
}
|
||||||
|
|
||||||
|
function toEmployeeRow(item, index) {
|
||||||
|
const name = item.nickname || item.name || item.artistName || `美甲师${index + 1}`
|
||||||
|
return {
|
||||||
|
id: item.userId || item.id,
|
||||||
|
name,
|
||||||
|
shortName: name.slice(-1),
|
||||||
|
avatar: item.avatar || item.avatarUrl || '',
|
||||||
|
color: item.color || EMPLOYEE_COLORS[index % EMPLOYEE_COLORS.length],
|
||||||
|
monthOrders: item.monthOrders || item.orderCount || 0,
|
||||||
|
monthAmount: item.monthAmount || item.turnover || 0,
|
||||||
|
scheduleSummary: buildScheduleSummary(item),
|
||||||
|
roleText: buildRoleText(item),
|
||||||
|
isManager: Number(item.type) === 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
|
managers: [],
|
||||||
employees: [],
|
employees: [],
|
||||||
loadError: '',
|
loadError: '',
|
||||||
createModalVisible: false,
|
createModalVisible: false,
|
||||||
@@ -37,21 +58,15 @@ Page({
|
|||||||
try {
|
try {
|
||||||
const data = await employeesApi.list({ page: 1, size: 50 })
|
const data = await employeesApi.list({ page: 1, size: 50 })
|
||||||
const list = data.list || data || []
|
const list = data.list || data || []
|
||||||
|
const rows = list.map(toEmployeeRow)
|
||||||
this.setData({
|
this.setData({
|
||||||
loadError: '',
|
loadError: '',
|
||||||
employees: list.map((item, index) => ({
|
managers: rows.filter(item => item.isManager),
|
||||||
id: item.userId || item.id,
|
employees: rows.filter(item => !item.isManager)
|
||||||
name: item.nickname || item.name || item.artistName || `美甲师${index + 1}`,
|
|
||||||
shortName: (item.nickname || item.name || '师').slice(-1),
|
|
||||||
avatar: item.avatar || item.avatarUrl || '',
|
|
||||||
color: item.color || EMPLOYEE_COLORS[index % EMPLOYEE_COLORS.length],
|
|
||||||
monthOrders: item.monthOrders || item.orderCount || 0,
|
|
||||||
monthAmount: item.monthAmount || item.turnover || 0,
|
|
||||||
scheduleSummary: buildScheduleSummary(item)
|
|
||||||
}))
|
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
managers: [],
|
||||||
employees: [],
|
employees: [],
|
||||||
loadError: error.message || '美甲师列表加载失败'
|
loadError: error.message || '美甲师列表加载失败'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -9,7 +9,31 @@
|
|||||||
<text>{{loadError}}</text>
|
<text>{{loadError}}</text>
|
||||||
<button class="secondary-btn retry-btn" bindtap="loadEmployees">重试</button>
|
<button class="secondary-btn retry-btn" bindtap="loadEmployees">重试</button>
|
||||||
</view>
|
</view>
|
||||||
<view wx:elif="{{employees.length === 0}}" class="empty card">暂无美甲师</view>
|
<view wx:elif="{{managers.length === 0 && employees.length === 0}}" class="empty card">暂无美甲师</view>
|
||||||
|
|
||||||
|
<view wx:if="{{managers.length}}" class="employee-section">
|
||||||
|
<view class="section-subtitle">店长</view>
|
||||||
|
<view wx:for="{{managers}}" wx:key="id" class="card employee-card manager-card" data-id="{{item.id}}" bindtap="openDetail">
|
||||||
|
<view class="employee-left">
|
||||||
|
<view wx:if="{{item.avatar}}" class="avatar image-avatar">
|
||||||
|
<image src="{{item.avatar}}" mode="aspectFill"></image>
|
||||||
|
</view>
|
||||||
|
<view wx:else class="avatar" style="background: {{item.color}};">{{item.shortName}}</view>
|
||||||
|
<view>
|
||||||
|
<view class="employee-title-row">
|
||||||
|
<text class="employee-name">{{item.name}}</text>
|
||||||
|
<text class="role-tag manager">{{item.roleText}}</text>
|
||||||
|
</view>
|
||||||
|
<text class="employee-schedule">{{item.scheduleSummary}}</text>
|
||||||
|
<text class="employee-meta">本月 {{item.monthOrders}} 单 · ¥{{item.monthAmount}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="color-pill" style="background: {{item.color}};"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view wx:if="{{employees.length}}" class="employee-section">
|
||||||
|
<view class="section-subtitle">店员</view>
|
||||||
<view wx:for="{{employees}}" wx:key="id" class="card employee-card" data-id="{{item.id}}" bindtap="openDetail">
|
<view wx:for="{{employees}}" wx:key="id" class="card employee-card" data-id="{{item.id}}" bindtap="openDetail">
|
||||||
<view class="employee-left">
|
<view class="employee-left">
|
||||||
<view wx:if="{{item.avatar}}" class="avatar image-avatar">
|
<view wx:if="{{item.avatar}}" class="avatar image-avatar">
|
||||||
@@ -17,7 +41,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view wx:else class="avatar" style="background: {{item.color}};">{{item.shortName}}</view>
|
<view wx:else class="avatar" style="background: {{item.color}};">{{item.shortName}}</view>
|
||||||
<view>
|
<view>
|
||||||
|
<view class="employee-title-row">
|
||||||
<text class="employee-name">{{item.name}}</text>
|
<text class="employee-name">{{item.name}}</text>
|
||||||
|
<text class="role-tag">{{item.roleText}}</text>
|
||||||
|
</view>
|
||||||
<text class="employee-schedule">{{item.scheduleSummary}}</text>
|
<text class="employee-schedule">{{item.scheduleSummary}}</text>
|
||||||
<text class="employee-meta">本月 {{item.monthOrders}} 单 · ¥{{item.monthAmount}}</text>
|
<text class="employee-meta">本月 {{item.monthOrders}} 单 · ¥{{item.monthAmount}}</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -25,6 +52,7 @@
|
|||||||
<view class="color-pill" style="background: {{item.color}};"></view>
|
<view class="color-pill" style="background: {{item.color}};"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view wx:if="{{createModalVisible}}" class="modal-mask" bindtap="closeCreateModal">
|
<view wx:if="{{createModalVisible}}" class="modal-mask" bindtap="closeCreateModal">
|
||||||
<view class="employee-modal" catchtap="stopTap">
|
<view class="employee-modal" catchtap="stopTap">
|
||||||
|
|||||||
@@ -31,12 +31,39 @@
|
|||||||
box-shadow: 0 6rpx 18rpx rgba(58, 48, 34, 0.08);
|
box-shadow: 0 6rpx 18rpx rgba(58, 48, 34, 0.08);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.employee-section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 14rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.employee-section + .employee-section {
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-subtitle {
|
||||||
|
color: #6d665f;
|
||||||
|
font-size: 24rpx;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.manager-card {
|
||||||
|
border-color: rgba(111, 143, 131, 0.22);
|
||||||
|
}
|
||||||
|
|
||||||
.employee-left {
|
.employee-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 18rpx;
|
gap: 18rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.employee-title-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.avatar {
|
.avatar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -67,6 +94,23 @@
|
|||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.role-tag {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
min-height: 34rpx;
|
||||||
|
padding: 0 12rpx;
|
||||||
|
border-radius: 999rpx;
|
||||||
|
background: #f2ede7;
|
||||||
|
color: #7b7168;
|
||||||
|
font-size: 20rpx;
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
.role-tag.manager {
|
||||||
|
background: #e5eee9;
|
||||||
|
color: #55786d;
|
||||||
|
}
|
||||||
|
|
||||||
.employee-meta {
|
.employee-meta {
|
||||||
margin-top: 8rpx;
|
margin-top: 8rpx;
|
||||||
color: #91897f;
|
color: #91897f;
|
||||||
|
|||||||
@@ -1,11 +1,99 @@
|
|||||||
|
const employeesApi = require('../../api/employees')
|
||||||
|
const dateUtil = require('../../utils/date')
|
||||||
|
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||||
|
|
||||||
|
function formatExceptionSummary(item) {
|
||||||
|
const date = String(item.workDate || '').slice(0, 10)
|
||||||
|
const remark = String(item.remark || '').trim()
|
||||||
|
return {
|
||||||
|
id: item.id || `${date}-${remark || 'leave'}`,
|
||||||
|
date,
|
||||||
|
text: remark || '全天请假'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
days: Array.from({ length: 31 }).map((_, index) => ({ day: index + 1, rest: [12, 25].includes(index + 1) })),
|
artistId: '',
|
||||||
records: [
|
records: [],
|
||||||
{ date: '2026-06-12', text: '全天请假' },
|
leaveForm: {
|
||||||
{ date: '2026-06-25', text: '下午请假' }
|
workDate: dateUtil.formatDate(new Date()),
|
||||||
]
|
remark: ''
|
||||||
},
|
},
|
||||||
add() { wx.showToast({ title: '请选择日期后保存', icon: 'none' }) },
|
loading: false,
|
||||||
back() { wx.navigateBack() }
|
saving: false,
|
||||||
|
loadError: ''
|
||||||
|
},
|
||||||
|
|
||||||
|
onLoad(options) {
|
||||||
|
this.setData({ artistId: options.id || '' })
|
||||||
|
this.loadRecords()
|
||||||
|
},
|
||||||
|
|
||||||
|
async loadRecords() {
|
||||||
|
if (!this.data.artistId) {
|
||||||
|
this.setData({ records: [], loadError: '员工ID不能为空' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.setData({ loading: true, loadError: '' })
|
||||||
|
try {
|
||||||
|
const setting = await employeesApi.scheduleRule({ artistId: this.data.artistId })
|
||||||
|
const exceptions = Array.isArray(setting.exceptions) ? setting.exceptions : []
|
||||||
|
this.setData({
|
||||||
|
records: exceptions
|
||||||
|
.filter(item => item.exceptionType === 'REST')
|
||||||
|
.map(formatExceptionSummary)
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
this.setData({
|
||||||
|
records: [],
|
||||||
|
loadError: error.message || '工时记录加载失败'
|
||||||
|
})
|
||||||
|
} finally {
|
||||||
|
this.setData({ loading: false })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onLeaveDateChange(event) {
|
||||||
|
this.setData({ 'leaveForm.workDate': event.detail.value })
|
||||||
|
},
|
||||||
|
|
||||||
|
onLeaveRemarkInput(event) {
|
||||||
|
this.setData({ 'leaveForm.remark': event.detail.value })
|
||||||
|
},
|
||||||
|
|
||||||
|
async add() {
|
||||||
|
const form = this.data.leaveForm
|
||||||
|
if (!this.data.artistId) {
|
||||||
|
wx.showToast({ title: '员工ID不能为空', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!form.workDate) {
|
||||||
|
wx.showToast({ title: '请选择请假日期', icon: 'none' })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.setData({ saving: true })
|
||||||
|
try {
|
||||||
|
await employeesApi.saveScheduleException({
|
||||||
|
artistId: this.data.artistId,
|
||||||
|
workDate: form.workDate,
|
||||||
|
exceptionType: 'REST',
|
||||||
|
startTime: null,
|
||||||
|
endTime: null,
|
||||||
|
remark: String(form.remark || '').trim()
|
||||||
|
})
|
||||||
|
markPlanningRefresh()
|
||||||
|
wx.showToast({ title: '请假已新增', icon: 'success' })
|
||||||
|
this.setData({ 'leaveForm.remark': '' })
|
||||||
|
await this.loadRecords()
|
||||||
|
} catch (error) {
|
||||||
|
wx.showToast({ title: error.message || '新增请假失败', icon: 'none' })
|
||||||
|
} finally {
|
||||||
|
this.setData({ saving: false })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
back() {
|
||||||
|
wx.navigateBack()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"navigationBarTitleText": "请假管理"
|
"navigationBarTitleText": "工时管理"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,31 @@
|
|||||||
<view class="page no-tab">
|
<view class="page no-tab">
|
||||||
<view class="card mini-calendar">
|
<view class="card leave-form">
|
||||||
<view wx:for="{{days}}" wx:key="date" class="mini-day {{item.rest ? 'rest' : ''}}">{{item.day}}</view>
|
<view class="field">
|
||||||
|
<text class="field-label">请假日期</text>
|
||||||
|
<picker mode="date" value="{{leaveForm.workDate}}" bindchange="onLeaveDateChange">
|
||||||
|
<view class="field-value">{{leaveForm.workDate}}</view>
|
||||||
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="field">
|
||||||
|
<text class="field-label">备注</text>
|
||||||
|
<input value="{{leaveForm.remark}}" bindinput="onLeaveRemarkInput" placeholder="可选,例如全天请假" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="section">
|
<view class="section">
|
||||||
<view class="section-title">请假记录</view>
|
<view class="section-title">工时记录</view>
|
||||||
<view class="list">
|
<view class="list">
|
||||||
<view wx:for="{{records}}" wx:key="date" class="card list-card">{{item.date}} {{item.text}}</view>
|
<view wx:if="{{loading}}" class="empty card">工时记录加载中...</view>
|
||||||
|
<view wx:elif="{{loadError}}" class="empty card error">
|
||||||
|
<text>{{loadError}}</text>
|
||||||
|
<button class="secondary-btn retry-btn" bindtap="loadRecords">重试</button>
|
||||||
|
</view>
|
||||||
|
<view wx:elif="{{records.length === 0}}" class="empty card">暂无请假记录</view>
|
||||||
|
<view wx:for="{{records}}" wx:key="id" class="card list-card leave-record">
|
||||||
|
<text class="leave-date">{{item.date}}</text>
|
||||||
|
<text class="leave-text">{{item.text}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fixed-bottom"><button class="primary-btn" bindtap="add">新增请假</button></view>
|
</view>
|
||||||
|
<view class="fixed-bottom"><button class="primary-btn" loading="{{saving}}" bindtap="add">新增请假</button></view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,22 +1,49 @@
|
|||||||
.mini-calendar {
|
.leave-form {
|
||||||
display: grid;
|
padding: 8rpx 24rpx;
|
||||||
grid-template-columns: repeat(7, 1fr);
|
|
||||||
gap: 10rpx;
|
|
||||||
padding: 18rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini-day {
|
.field input,
|
||||||
display: flex;
|
.field-value {
|
||||||
align-items: center;
|
text-align: right;
|
||||||
justify-content: center;
|
}
|
||||||
height: 64rpx;
|
|
||||||
border-radius: 10rpx;
|
.field-value {
|
||||||
background: #f2ede7;
|
min-height: 58rpx;
|
||||||
color: #5d564e;
|
padding: 14rpx 20rpx;
|
||||||
|
border-radius: 999rpx;
|
||||||
|
background: #f4f0ea;
|
||||||
|
color: #4d473f;
|
||||||
|
font-size: 26rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini-day.rest {
|
.leave-record {
|
||||||
background: #e7f0f6;
|
display: flex;
|
||||||
color: #6e9fbd;
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leave-date,
|
||||||
|
.leave-text {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leave-date {
|
||||||
|
color: #302c27;
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-weight: 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.leave-text {
|
||||||
|
color: #7b7168;
|
||||||
|
text-align: right;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.retry-btn {
|
||||||
|
width: 180rpx;
|
||||||
|
min-width: 180rpx;
|
||||||
|
max-width: 180rpx;
|
||||||
|
margin: 24rpx auto 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
const employeesApi = require('../../api/employees')
|
const employeesApi = require('../../api/employees')
|
||||||
const dateUtil = require('../../utils/date')
|
|
||||||
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
const { markPlanningRefresh } = require('../../utils/planning-refresh')
|
||||||
|
|
||||||
const PRESETS = [
|
const PRESETS = [
|
||||||
@@ -20,12 +19,6 @@ const WEEKDAYS = [
|
|||||||
{ value: 7, label: '周日' }
|
{ value: 7, label: '周日' }
|
||||||
]
|
]
|
||||||
|
|
||||||
const EXCEPTION_TYPES = [
|
|
||||||
{ value: 'REST', label: '休假' },
|
|
||||||
{ value: 'EXTRA_WORK', label: '临时上班' },
|
|
||||||
{ value: 'CHANGE_SHIFT', label: '临时改班' }
|
|
||||||
]
|
|
||||||
|
|
||||||
function copyWorkDays(days) {
|
function copyWorkDays(days) {
|
||||||
return (days || []).map(day => Number(day)).filter(day => day >= 1 && day <= 7)
|
return (days || []).map(day => Number(day)).filter(day => day >= 1 && day <= 7)
|
||||||
}
|
}
|
||||||
@@ -49,22 +42,6 @@ function buildWeekdayOptions(workDays) {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
function buildExceptionTypeLabel(exceptionType) {
|
|
||||||
const option = EXCEPTION_TYPES.find(item => item.value === exceptionType) || EXCEPTION_TYPES[0]
|
|
||||||
return option.label
|
|
||||||
}
|
|
||||||
|
|
||||||
function buildExceptionSummary(item) {
|
|
||||||
const type = EXCEPTION_TYPES.find(option => option.value === item.exceptionType)
|
|
||||||
if (!item) {
|
|
||||||
return ''
|
|
||||||
}
|
|
||||||
if (item.exceptionType === 'REST') {
|
|
||||||
return `${item.workDate} ${type ? type.label : '休假'}`
|
|
||||||
}
|
|
||||||
return `${item.workDate} ${type ? type.label : '例外'} ${String(item.startTime || '').slice(0, 5)}-${String(item.endTime || '').slice(0, 5)}`
|
|
||||||
}
|
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
artistId: '',
|
artistId: '',
|
||||||
@@ -72,10 +49,6 @@ Page({
|
|||||||
presetOptions: buildPresetOptions('DOUBLE_REST'),
|
presetOptions: buildPresetOptions('DOUBLE_REST'),
|
||||||
weekdays: WEEKDAYS,
|
weekdays: WEEKDAYS,
|
||||||
weekdayOptions: buildWeekdayOptions([1, 2, 3, 4, 5]),
|
weekdayOptions: buildWeekdayOptions([1, 2, 3, 4, 5]),
|
||||||
exceptionTypes: EXCEPTION_TYPES,
|
|
||||||
exceptionTypeIndex: 0,
|
|
||||||
exceptionTypeLabel: '休假',
|
|
||||||
exceptions: [],
|
|
||||||
loading: false,
|
loading: false,
|
||||||
saving: false,
|
saving: false,
|
||||||
form: {
|
form: {
|
||||||
@@ -84,13 +57,6 @@ Page({
|
|||||||
startTime: '09:00',
|
startTime: '09:00',
|
||||||
endTime: '17:00',
|
endTime: '17:00',
|
||||||
remark: ''
|
remark: ''
|
||||||
},
|
|
||||||
exceptionForm: {
|
|
||||||
workDate: dateUtil.formatDate(new Date()),
|
|
||||||
exceptionType: 'REST',
|
|
||||||
startTime: '10:00',
|
|
||||||
endTime: '18:00',
|
|
||||||
remark: ''
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -119,13 +85,7 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
form,
|
form,
|
||||||
presetOptions: buildPresetOptions(form.presetType),
|
presetOptions: buildPresetOptions(form.presetType),
|
||||||
weekdayOptions: buildWeekdayOptions(form.workDays),
|
weekdayOptions: buildWeekdayOptions(form.workDays)
|
||||||
exceptions: (setting.exceptions || []).map(item => ({
|
|
||||||
...item,
|
|
||||||
startTime: item.startTime ? String(item.startTime).slice(0, 5) : '',
|
|
||||||
endTime: item.endTime ? String(item.endTime).slice(0, 5) : '',
|
|
||||||
summary: buildExceptionSummary(item)
|
|
||||||
}))
|
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
wx.showToast({ title: error.message || '排班规则加载失败', icon: 'none' })
|
wx.showToast({ title: error.message || '排班规则加载失败', icon: 'none' })
|
||||||
@@ -184,33 +144,6 @@ Page({
|
|||||||
this.setData({ [`form.${field}`]: event.detail.value })
|
this.setData({ [`form.${field}`]: event.detail.value })
|
||||||
},
|
},
|
||||||
|
|
||||||
onExceptionInput(event) {
|
|
||||||
const field = event.currentTarget.dataset.field
|
|
||||||
this.setData({ [`exceptionForm.${field}`]: event.detail.value })
|
|
||||||
},
|
|
||||||
|
|
||||||
onExceptionDateChange(event) {
|
|
||||||
this.setData({ 'exceptionForm.workDate': event.detail.value })
|
|
||||||
},
|
|
||||||
|
|
||||||
onExceptionStartChange(event) {
|
|
||||||
this.setData({ 'exceptionForm.startTime': event.detail.value })
|
|
||||||
},
|
|
||||||
|
|
||||||
onExceptionEndChange(event) {
|
|
||||||
this.setData({ 'exceptionForm.endTime': event.detail.value })
|
|
||||||
},
|
|
||||||
|
|
||||||
onExceptionTypeChange(event) {
|
|
||||||
const index = Number(event.detail.value)
|
|
||||||
const option = this.data.exceptionTypes[index] || this.data.exceptionTypes[0]
|
|
||||||
this.setData({
|
|
||||||
exceptionTypeIndex: index,
|
|
||||||
exceptionTypeLabel: buildExceptionTypeLabel(option.value),
|
|
||||||
'exceptionForm.exceptionType': option.value
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
async save() {
|
async save() {
|
||||||
const form = this.data.form
|
const form = this.data.form
|
||||||
const workDays = copyWorkDays(form.workDays)
|
const workDays = copyWorkDays(form.workDays)
|
||||||
@@ -243,36 +176,6 @@ Page({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async saveException() {
|
|
||||||
const form = this.data.exceptionForm
|
|
||||||
if (!form.workDate || !form.exceptionType) {
|
|
||||||
wx.showToast({ title: '请补全例外日期', icon: 'none' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if (form.exceptionType !== 'REST' && (!form.startTime || !form.endTime || form.startTime >= form.endTime)) {
|
|
||||||
wx.showToast({ title: '请填写正确的例外时间', icon: 'none' })
|
|
||||||
return
|
|
||||||
}
|
|
||||||
this.setData({ saving: true })
|
|
||||||
try {
|
|
||||||
await employeesApi.saveScheduleException({
|
|
||||||
artistId: this.data.artistId,
|
|
||||||
workDate: form.workDate,
|
|
||||||
exceptionType: form.exceptionType,
|
|
||||||
startTime: form.exceptionType === 'REST' ? null : form.startTime,
|
|
||||||
endTime: form.exceptionType === 'REST' ? null : form.endTime,
|
|
||||||
remark: String(form.remark || '').trim()
|
|
||||||
})
|
|
||||||
markPlanningRefresh()
|
|
||||||
wx.showToast({ title: '例外已保存', icon: 'success' })
|
|
||||||
await this.loadRule()
|
|
||||||
} catch (error) {
|
|
||||||
wx.showToast({ title: error.message || '例外保存失败', icon: 'none' })
|
|
||||||
} finally {
|
|
||||||
this.setData({ saving: false })
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
wx.navigateBack()
|
wx.navigateBack()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,40 +28,6 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="section">
|
|
||||||
<view class="section-title">特殊日期</view>
|
|
||||||
<view class="card rule-card">
|
|
||||||
<view class="field">
|
|
||||||
<text class="field-label">日期</text>
|
|
||||||
<picker mode="date" value="{{exceptionForm.workDate}}" bindchange="onExceptionDateChange"><view class="field-value">{{exceptionForm.workDate}}</view></picker>
|
|
||||||
</view>
|
|
||||||
<view class="field">
|
|
||||||
<text class="field-label">类型</text>
|
|
||||||
<picker range="{{exceptionTypes}}" range-key="label" value="{{exceptionTypeIndex}}" bindchange="onExceptionTypeChange"><view class="field-value">{{exceptionTypeLabel}}</view></picker>
|
|
||||||
</view>
|
|
||||||
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="field">
|
|
||||||
<text class="field-label">开始时间</text>
|
|
||||||
<picker mode="time" value="{{exceptionForm.startTime}}" bindchange="onExceptionStartChange"><view class="field-value">{{exceptionForm.startTime}}</view></picker>
|
|
||||||
</view>
|
|
||||||
<view wx:if="{{exceptionForm.exceptionType !== 'REST'}}" class="field">
|
|
||||||
<text class="field-label">结束时间</text>
|
|
||||||
<picker mode="time" value="{{exceptionForm.endTime}}" bindchange="onExceptionEndChange"><view class="field-value">{{exceptionForm.endTime}}</view></picker>
|
|
||||||
</view>
|
|
||||||
<view class="field">
|
|
||||||
<text class="field-label">备注</text>
|
|
||||||
<input value="{{exceptionForm.remark}}" data-field="remark" bindinput="onExceptionInput" placeholder="可选" />
|
|
||||||
</view>
|
|
||||||
<button class="secondary-btn exception-btn" loading="{{saving}}" bindtap="saveException">保存特殊日期</button>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view wx:if="{{exceptions.length}}" class="exception-list">
|
|
||||||
<view wx:for="{{exceptions}}" wx:key="id" class="card exception-card">
|
|
||||||
<text>{{item.summary}}</text>
|
|
||||||
<text wx:if="{{item.remark}}" class="exception-remark">{{item.remark}}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="fixed-bottom">
|
<view class="fixed-bottom">
|
||||||
<button class="primary-btn" loading="{{saving}}" bindtap="save">保存排班规则</button>
|
<button class="primary-btn" loading="{{saving}}" bindtap="save">保存排班规则</button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
.rule-card {
|
.rule-card {
|
||||||
padding: 20rpx 24rpx;
|
padding: 20rpx 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,35 +60,3 @@
|
|||||||
font-size: 26rpx;
|
font-size: 26rpx;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|
||||||
.exception-btn {
|
|
||||||
margin-top: 22rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.exception-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 14rpx;
|
|
||||||
margin-top: 18rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.exception-card {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8rpx;
|
|
||||||
padding: 20rpx 24rpx;
|
|
||||||
color: #4c4740;
|
|
||||||
font-size: 24rpx;
|
|
||||||
font-weight: 700;
|
|
||||||
transition: transform 180ms ease, box-shadow 180ms ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.exception-card:active {
|
|
||||||
transform: scale(0.99);
|
|
||||||
}
|
|
||||||
|
|
||||||
.exception-remark {
|
|
||||||
color: #8d857b;
|
|
||||||
font-size: 22rpx;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
# 店务员工工时与订单记录设计
|
||||||
|
|
||||||
|
## 范围
|
||||||
|
|
||||||
|
- 店务小程序员工页展示店长,并将店长置顶为单独区域。
|
||||||
|
- 店长可以从员工页进入店长自己的员工详情页,查看个人基础信息。
|
||||||
|
- 员工排班设置页移除特殊日期模块,常规排班保存保持不变。
|
||||||
|
- 员工详情入口从“请假管理”改为“工时管理”,工时管理内支持新增请假。
|
||||||
|
- 员工订单记录点击具体订单跳转到现有预约详情页。
|
||||||
|
|
||||||
|
## 方案
|
||||||
|
|
||||||
|
- 后端 `GET /admin/manager/employees` 对非平台管理员改用可管理人员列表,复用已有店长兜底资料能力,不影响用户端可预约人员接口。
|
||||||
|
- 小程序员工列表把 `type=2` 的店长归入置顶区域,其余人员显示在员工列表;两类卡片沿用当前员工卡片样式,只增加角色标签。
|
||||||
|
- 员工详情复用现有员工详情接口,展示姓名、角色、手机号、联系电话、微信号、账号等基础信息;没有返回值时显示“未填写”。
|
||||||
|
- 排班设置页只保留常规排班规则。已有员工排班例外接口保留,由工时管理页用于新增 REST 请假。
|
||||||
|
- 工时管理页从员工排班规则设置返回的 `exceptions` 渲染请假记录,新增请假保存 `exceptionType=REST`,并标记规划页刷新。
|
||||||
|
- 员工订单记录使用订单项 ID 打开 `/pages/appointment-detail/index`。
|
||||||
|
|
||||||
|
## 验证
|
||||||
|
|
||||||
|
- 后端定向测试覆盖店长员工列表使用可管理列表。
|
||||||
|
- 店务小程序做 JS 语法检查和静态路由/文案检查。
|
||||||
|
- 提交前运行 `git diff --check` 与 GitNexus `detect_changes`。
|
||||||
@@ -451,3 +451,11 @@
|
|||||||
- 安全措施:修改前已在生产 Nginx 节点创建带时间戳的配置备份;未修改 MinIO、软路由、Nacos、数据库或应用代码。
|
- 安全措施:修改前已在生产 Nginx 节点创建带时间戳的配置备份;未修改 MinIO、软路由、Nacos、数据库或应用代码。
|
||||||
- 验证结果:`nginx -t` 通过并 reload;当前 DNS `wcy111.top -> 14.107.44.229`;三台 Core 访问 `https://minio.yunail.art/minio/health/live` 均返回 `200`;Nginx 本机 HTTP/HTTPS 虚拟主机均返回 `200`。
|
- 验证结果:`nginx -t` 通过并 reload;当前 DNS `wcy111.top -> 14.107.44.229`;三台 Core 访问 `https://minio.yunail.art/minio/health/live` 均返回 `200`;Nginx 本机 HTTP/HTTPS 虚拟主机均返回 `200`。
|
||||||
- 数据库说明:本次不新增 SQL,不修改初始化 SQL,不需要执行数据库迁移。
|
- 数据库说明:本次不新增 SQL,不修改初始化 SQL,不需要执行数据库迁移。
|
||||||
|
|
||||||
|
## 2026-07-24 店务小程序员工工时与订单记录调整
|
||||||
|
|
||||||
|
- 变更原因:店务端需要在员工页展示店长,允许查看店长基础信息;排班设置不再直接维护特殊日期;请假入口改为工时管理;员工订单记录需要可进入订单详情。
|
||||||
|
- 处理方式:`/admin/manager/employees` 非平台管理员改用 `getManageableByShopId`,复用已有店长兜底资料;店务小程序员工列表按店长/店员分区展示,员工详情新增基础信息卡片并把请假管理入口改为工时管理;排班设置页移除特殊日期 UI;工时管理页读取员工排班例外中的 `REST` 记录并支持新增请假;订单记录行点击跳转预约详情页。
|
||||||
|
- 数据库说明:本次不新增 SQL,不修改初始化 SQL,不需要执行数据库迁移。
|
||||||
|
- 影响范围:影响 `JY-Core` 管理端员工列表接口和 `JY-Salon-WeChat` 员工、排班、工时、订单记录页面;不改用户端可预约人员接口,不删除后端排班例外能力,不改变预约容量校验链路。
|
||||||
|
- 验证方式:执行店务小程序相关 JS 语法检查、后端 `AdminManagerControllerTest` 定向测试、关键旧文案检索、`git diff --check` 和 GitNexus 变更检测。
|
||||||
|
|||||||
@@ -111,3 +111,12 @@
|
|||||||
- 已完成:创建生产 Nginx 配置备份,`nginx -t` 通过并 reload。
|
- 已完成:创建生产 Nginx 配置备份,`nginx -t` 通过并 reload。
|
||||||
- 已验证:三台 Core 访问 `https://minio.yunail.art/minio/health/live` 均返回 200;Nginx 本机 HTTP/HTTPS 虚拟主机均返回 200。
|
- 已验证:三台 Core 访问 `https://minio.yunail.art/minio/health/live` 均返回 200;Nginx 本机 HTTP/HTTPS 虚拟主机均返回 200。
|
||||||
- 当前阻塞:暂无;七牛副本区域错误仍是独立问题,尚未修改。
|
- 当前阻塞:暂无;七牛副本区域错误仍是独立问题,尚未修改。
|
||||||
|
|
||||||
|
## 2026-07-24 店务小程序员工工时与订单记录
|
||||||
|
|
||||||
|
- 已完成:用户确认店长置顶单独区,视觉保持当前小程序卡片风格。
|
||||||
|
- 已完成:后端员工列表非平台管理员改用可管理列表,以便店长出现在员工页。
|
||||||
|
- 已完成:店务小程序员工页分区展示店长/店员,员工详情展示基础信息,入口改为工时管理。
|
||||||
|
- 已完成:排班设置移除特殊日期 UI,工时管理页读取请假记录并支持新增 REST 请假,订单记录行跳转预约详情。
|
||||||
|
- 下一步:运行最终检查、GitNexus 变更检测并提交本次相关文件。
|
||||||
|
- 当前阻塞:暂无。
|
||||||
|
|||||||
Reference in New Issue
Block a user