优化预约客户输入与唯一性校验
This commit is contained in:
@@ -1,15 +1,13 @@
|
||||
<view class="page no-tab">
|
||||
<view class="card form-card">
|
||||
<view class="field customer-field" bindtap="openCustomerSheet">
|
||||
<text class="field-label required">客户</text>
|
||||
<view class="reference-card {{form.customerName ? 'filled' : ''}}">
|
||||
<view class="reference-copy">
|
||||
<text class="reference-title">{{form.customerName || '请选择客户'}}</text>
|
||||
<text class="reference-subtitle">{{form.phone || '搜索已有客户或手动录入'}}</text>
|
||||
</view>
|
||||
<text wx:if="{{form.customerUserId}}" class="reference-badge">已有</text>
|
||||
<text class="reference-arrow">›</text>
|
||||
<view class="field customer-field">
|
||||
<text class="field-label required">客户姓名</text>
|
||||
<view class="customer-entry">
|
||||
<input class="customer-name-input" value="{{form.customerName}}" data-field="customerName" bindinput="onCustomerInput" placeholder="请输入客户姓名" />
|
||||
<button class="customer-select-btn" catchtap="openCustomerSheet">选择已有客户</button>
|
||||
</view>
|
||||
<input class="customer-phone-input" value="{{form.phone}}" data-field="phone" bindinput="onCustomerInput" type="number" maxlength="11" placeholder="手机号(可选)" />
|
||||
<text wx:if="{{form.customerUserId}}" class="customer-selected-tip">已关联系统客户</text>
|
||||
</view>
|
||||
<view class="field">
|
||||
<text class="field-label required">预约日期</text>
|
||||
@@ -76,12 +74,10 @@
|
||||
selected-id="{{form.customerUserId}}"
|
||||
loading="{{customerLoading}}"
|
||||
error-text="{{customerError}}"
|
||||
empty-text="暂无匹配客户,可手动录入"
|
||||
action-text="手动录入客户"
|
||||
empty-text="暂无匹配客户"
|
||||
bind:search="onCustomerSearch"
|
||||
bind:select="selectCustomer"
|
||||
bind:retry="retryCustomerSearch"
|
||||
bind:action="openManualCustomer"
|
||||
bind:close="closeCustomerSheet"
|
||||
/>
|
||||
|
||||
@@ -103,29 +99,6 @@
|
||||
bind:close="closeArtistSheet"
|
||||
/>
|
||||
|
||||
<view wx:if="{{manualCustomerVisible}}" class="modal-mask" bindtap="closeManualCustomer" catchtouchmove="stopTouchMove">
|
||||
<view class="manual-customer-sheet" catchtap="stopTap">
|
||||
<view class="modal-head">
|
||||
<view>
|
||||
<text class="modal-title">手动录入客户</text>
|
||||
<text class="modal-subtitle">录入后将直接带回本次预约</text>
|
||||
</view>
|
||||
<view class="modal-close" bindtap="closeManualCustomer">×</view>
|
||||
</view>
|
||||
<view class="manual-customer-form">
|
||||
<view class="manual-customer-field">
|
||||
<text class="required-label">客户姓名</text>
|
||||
<input value="{{manualCustomerForm.name}}" data-field="name" bindinput="onManualCustomerInput" placeholder="请输入客户姓名" />
|
||||
</view>
|
||||
<view class="manual-customer-field">
|
||||
<text class="required-label">手机号</text>
|
||||
<input value="{{manualCustomerForm.phone}}" data-field="phone" bindinput="onManualCustomerInput" type="number" maxlength="11" placeholder="请输入手机号" />
|
||||
</view>
|
||||
</view>
|
||||
<button class="primary-btn manual-customer-submit" bindtap="useManualCustomer">使用该客户</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<product-selector-sheet visible="{{productModalVisible}}" mode="{{productSelectorMode}}" title="选择预约作品" keyword="{{productKeyword}}" placeholder="搜索作品、标签、美甲师" items="{{filteredProducts}}" selected-id="{{form.productId}}" loading="{{loadingProducts}}" error-text="{{productError}}" empty-text="暂无匹配作品" manual-form="{{manualProductDraft}}" manual-more-expanded="{{manualProductMoreExpanded}}" manual-image-url="{{manualProductDraft.imageUrl}}" manual-image-uploading="{{manualImageUploading}}" bind:search="onProductSearch" bind:select="selectProduct" bind:openmanual="openManualProduct" bind:backtolist="backToProductList" bind:manualinput="onManualProductInput" bind:togglemore="toggleManualProductMore" bind:chooseimage="chooseManualProductImage" bind:removeimage="removeManualProductImage" bind:confirmmanual="useManualProduct" bind:retry="loadOptions" bind:close="closeProductModal" />
|
||||
|
||||
<view wx:if="{{timeSheetVisible}}" class="modal-mask" bindtap="closeTimeSheet">
|
||||
|
||||
Reference in New Issue
Block a user