114 lines
8.8 KiB
Plaintext
114 lines
8.8 KiB
Plaintext
<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 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 full" 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="list" title="选择已有款式" keyword="{{productKeyword}}" placeholder="搜索款式名称" items="{{productOptions}}" selected-id="{{form.productId}}" loading="{{loadingProducts}}" error-text="{{productError}}" empty-text="暂无款式" show-manual-action="{{true}}" bind:search="searchProducts" bind:select="selectProduct" bind:openmanual="openManualProduct" bind:close="closeProductSelector" bind:retry="loadProducts" />
|
||
<view wx:if="{{manualProductSheetVisible}}" class="modal-mask backfill-manual-product-mask" bindtap="closeManualProduct" catchtouchmove="stopTouchMove">
|
||
<view class="manual-style-sheet backfill-manual-style-sheet" catchtap="stopTap" catchtouchmove="stopTouchMove">
|
||
<view class="modal-head">
|
||
<view><text class="modal-title">录入本次美甲款式</text><text class="modal-subtitle">款式名称和价格必填</text></view>
|
||
<view class="modal-close" bindtap="closeManualProduct" aria-label="关闭款式录入"></view>
|
||
</view>
|
||
<scroll-view class="manual-style-content" scroll-y enhanced show-scrollbar="{{false}}">
|
||
<view class="style-name-row backfill-manual-fields">
|
||
<input class="style-name-input backfill-manual-product-name" value="{{manualProductDraft.title}}" data-field="title" bindinput="onManualProductInput" placeholder="请输入款式名称" />
|
||
<input class="style-name-input backfill-manual-product-price" value="{{manualProductDraft.price}}" data-field="price" bindinput="onManualProductInput" type="digit" placeholder="参考价格" />
|
||
</view>
|
||
<text class="manual-style-hint">参考价会自动带入实际成交金额,保存前仍可按本次服务情况调整。</text>
|
||
</scroll-view>
|
||
<view class="manual-style-footer">
|
||
<button class="manual-style-confirm" bindtap="useManualProduct">用于本次补录</button>
|
||
<button class="manual-style-library-link" bindtap="openProductLibrary">从款式库中选择</button>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<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>
|