对齐历史补单页面样式

This commit is contained in:
2026-10-20 18:42:27 +08:00
parent 68533738e0
commit 8d3f092084
4 changed files with 504 additions and 21 deletions
+90 -15
View File
@@ -1,19 +1,94 @@
<view class="page no-tab">
<view class="card form-card">
<view class="page-hint">历史补单不校验美甲师排班,也不会占用预约时段。</view>
<view class="field"><text class="field-label required">服务日期</text><picker mode="date" value="{{form.serviceDate}}" bindchange="onDateChange"><view class="field-value">{{form.serviceDate}}</view></picker></view>
<view class="field product-field" bindtap="openProductSelector"><text class="field-label required">项目</text><button class="product-picker-button" bindtap="openProductSelector"><text>{{selectedProductTitle || form.manualProductTitle || '选择项目'}}</text><text wx:if="{{selectedProductPriceText}}" class="selected-amount">参考价 {{selectedProductPriceText}}</text><text class="product-picker-arrow">›</text></button></view>
<view class="field"><text class="field-label required">金额</text><input type="digit" value="{{form.amount}}" data-field="amount" bindinput="onInput" placeholder="请输入实际金额" /></view>
<view class="field"><text class="field-label required">美甲师</text><view class="field-value" bindtap="openArtistSelector">{{selectedArtistName || '请选择美甲师'}}</view></view>
<view class="field"><text class="field-label">客户</text><view class="field-value" bindtap="openCustomerSelector">{{form.customerName || '请选择客户(可选)'}}</view><input value="{{form.customerName}}" data-field="customerName" bindinput="onCustomerNameInput" placeholder="或填写散客姓名" /></view>
<view class="field"><text class="field-label">手机号</text><input type="number" maxlength="11" value="{{form.phone}}" data-field="phone" bindinput="onInput" placeholder="选填" /></view>
<view class="field"><text class="field-label">服务时间</text><picker mode="time" value="{{form.serviceTime}}" bindchange="onTimeChange"><view class="field-value">{{form.serviceTime || '时间未记录'}}</view></picker></view>
<view class="field"><text class="field-label">状态</text><view class="status-segment"><view class="status-option {{form.status == 4 ? 'active' : ''}}" data-status="4" bindtap="selectStatus">服务中</view><view class="status-option {{form.status == 2 ? 'active' : ''}}" data-status="2" bindtap="selectStatus">已完成</view></view></view>
<view class="field textarea-field"><text class="field-label">备注</text><textarea value="{{form.remark}}" data-field="remark" bindinput="onInput" placeholder="补单备注(选填)" /></view>
<view class="page no-tab backfill-page">
<view class="backfill-hero">
<view class="backfill-hero-copy">
<text class="backfill-eyebrow">HISTORICAL ORDER</text>
<text class="backfill-title">补录一笔历史订单</text>
</view>
<view class="backfill-date-pill"><text class="date-pill-icon">◷</text><text>{{form.serviceDate}}</text></view>
</view>
<view class="card submit-tip">提交后订单会直接进入所选状态,不创建预约占用。</view>
<button class="primary-btn" loading="{{submitting}}" disabled="{{submitting}}" bindtap="submit">保存历史补单</button>
<product-selector-sheet visible="{{productSelectorVisible}}" mode="{{productSelectorMode}}" title="选择项目" keyword="{{productKeyword}}" placeholder="搜索项目名称" items="{{productOptions}}" selected-id="{{form.productId}}" loading="{{loadingProducts}}" error-text="{{productError}}" empty-text="暂无项目" manual-form="{{manualProductDraft}}" show-manual-extra="{{false}}" bind:search="searchProducts" bind:select="selectProduct" bind:openmanual="openManualProduct" bind:backtolist="backToProductList" bind:manualinput="onManualProductInput" bind:togglemore="toggleManualProductMore" bind:confirmmanual="useManualProduct" bind:close="closeProductSelector" bind:retry="loadProducts" />
<view class="card form-card backfill-card style-section">
<view class="section-heading">
<view class="section-title-row"><text class="section-title-main">美甲款式</text><text class="required-mark">*</text></view>
<text class="section-caption">选择款式或手动录入</text>
</view>
<button class="field-card backfill-field-card" bindtap="openProductSelector">
<image wx:if="{{selectedProduct.coverImage}}" class="field-icon style-entry-image" src="{{selectedProduct.coverImage}}" mode="aspectFill"></image>
<view wx:else class="field-icon">✦</view>
<view class="field-text">
<text class="field-label">项目款式</text>
<text class="field-value {{selectedProductTitle || form.manualProductTitle ? '' : 'placeholder'}}">{{selectedProductTitle || form.manualProductTitle || '请选择美甲款式'}}</text>
<text wx:if="{{selectedProductPriceText}}" class="field-meta">参考价 {{selectedProductPriceText}}</text>
<text wx:else class="field-meta">可从款式库选择,也可手动录入</text>
</view>
<text class="chevron">›</text>
</button>
<view class="backfill-amount-field">
<text class="field-label required">实际成交金额(元)</text>
<view class="number-input-wrap"><input type="digit" value="{{form.amount}}" data-field="amount" bindinput="onInput" placeholder="请输入本次实际金额" /><text class="number-unit">元</text></view>
</view>
<view class="style-remark-field backfill-remark-field">
<text class="field-label">补单备注</text>
<textarea value="{{form.remark}}" data-field="remark" bindinput="onInput" placeholder="可记录服务说明或其他信息(选填)" />
</view>
<text class="style-hint">参考价会自动带入金额;补录订单按实际成交金额统计,可根据本次服务情况调整。</text>
</view>
<view class="card form-card backfill-card service-info-section">
<view class="section-heading">
<view><text class="section-title-main">服务信息</text><text class="section-caption">记录本次服务的日期、时间和美甲师</text></view>
</view>
<picker class="backfill-picker-field first" mode="date" value="{{form.serviceDate}}" bindchange="onDateChange">
<view class="field-card backfill-field-card">
<view class="field-icon">▣</view>
<view class="field-text"><text class="field-label">服务日期</text><text class="field-value">{{form.serviceDate}}</text></view>
<text class="chevron">›</text>
</view>
</picker>
<picker class="backfill-picker-field" mode="time" value="{{form.serviceTime}}" bindchange="onTimeChange">
<view class="field-card backfill-field-card">
<view class="field-icon">◷</view>
<view class="field-text"><text class="field-label">服务时间</text><text class="field-value {{form.serviceTime ? '' : 'placeholder'}}">{{form.serviceTime || '时间未记录'}}</text><text class="field-meta">时间可留空,仅按服务日期统计</text></view>
<text class="chevron">›</text>
</view>
</picker>
<view class="field-card backfill-field-card service-artist-field" bindtap="openArtistSelector">
<view class="field-icon">♙</view>
<view class="field-text"><text class="field-label">服务美甲师</text><text class="field-value {{selectedArtistName ? '' : 'placeholder'}}">{{selectedArtistName || '请选择美甲师'}}</text></view>
<text class="chevron">›</text>
</view>
</view>
<view class="card form-card backfill-card customer-section">
<view class="section-heading">
<view><text class="section-title-main">客户</text><text class="section-caption">可选择已有客户或直接填写,留空时按散客记录</text></view>
</view>
<view class="customer-entry">
<view class="customer-fields">
<input class="customer-name-input" value="{{form.customerName}}" data-field="customerName" bindinput="onCustomerNameInput" placeholder="客户姓名(可选)" />
<input class="customer-phone-input" value="{{form.phone}}" data-field="phone" bindinput="onInput" type="number" maxlength="11" placeholder="手机号(可选)" />
</view>
<button class="customer-library-btn" aria-label="选择已有客户" catchtap="openCustomerSelector"><text class="customer-library-icon">⌕</text></button>
</view>
<view wx:if="{{form.customerUserId}}" class="customer-selected-tip">已选择系统客户</view>
</view>
<view class="card form-card backfill-card service-status-section">
<view class="section-heading">
<view><text class="section-title-main">服务状态</text><text class="section-caption">补单直接进入选择的状态</text></view>
</view>
<view class="status-segment">
<view class="status-option {{form.status == 4 ? 'active' : ''}}" data-status="4" bindtap="selectStatus"><text class="status-indicator in-service"></text><text>服务中</text></view>
<view class="status-option {{form.status == 2 ? 'active' : ''}}" data-status="2" bindtap="selectStatus"><text class="status-indicator completed"></text><text>已完成</text></view>
</view>
<text class="style-hint">历史补单不校验美甲师排班,也不会占用预约时段。</text>
</view>
<view class="fixed-bottom backfill-bottom">
<button class="primary-btn backfill-submit-btn" loading="{{submitting}}" disabled="{{submitting}}" bindtap="submit">保存历史补单</button>
</view>
<product-selector-sheet visible="{{productSelectorVisible}}" mode="{{productSelectorMode}}" title="选择美甲款式" keyword="{{productKeyword}}" placeholder="搜索款式名称" items="{{productOptions}}" selected-id="{{form.productId}}" loading="{{loadingProducts}}" error-text="{{productError}}" empty-text="暂无款式" manual-form="{{manualProductDraft}}" show-manual-extra="{{false}}" bind:search="searchProducts" bind:select="selectProduct" bind:openmanual="openManualProduct" bind:backtolist="backToProductList" bind:manualinput="onManualProductInput" bind:togglemore="toggleManualProductMore" bind:confirmmanual="useManualProduct" bind:close="closeProductSelector" bind:retry="loadProducts" />
<entity-selector-sheet visible="{{artistSelectorVisible}}" title="选择美甲师" keyword="{{artistKeyword}}" placeholder="搜索美甲师姓名" items="{{artistOptions}}" selected-id="{{form.artistId}}" loading="{{loadingArtists}}" error-text="{{artistError}}" empty-text="暂无可选美甲师" bind:search="searchArtists" bind:select="selectArtist" bind:retry="loadArtists" bind:close="closeArtistSelector" />
<entity-selector-sheet visible="{{customerSelectorVisible}}" title="选择客户" keyword="{{customerKeyword}}" placeholder="搜索客户姓名或手机号" items="{{customerOptions}}" selected-id="{{form.customerUserId}}" loading="{{loadingCustomers}}" error-text="{{customerError}}" empty-text="暂无客户,可留空记为散客" action-text="按散客记录" bind:search="searchCustomers" bind:select="selectCustomer" bind:retry="loadCustomers" bind:action="useWalkIn" bind:close="closeCustomerSelector" />
</view>