地址路径修改
This commit is contained in:
@@ -49,6 +49,13 @@
|
||||
>
|
||||
<text>添加仓库</text>
|
||||
</view>
|
||||
<view
|
||||
class="tab-item {{currentTab === 'edit' ? 'active' : ''}}"
|
||||
data-tab="edit"
|
||||
bindtap="switchTab"
|
||||
>
|
||||
<text>编辑仓库</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 仓库列表页面 -->
|
||||
@@ -86,11 +93,18 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="warehouse-actions">
|
||||
<button
|
||||
class="edit-btn"
|
||||
data-id="{{item.id}}"
|
||||
bindtap="editWarehouse"
|
||||
size="mini"
|
||||
>编辑</button>
|
||||
<button
|
||||
class="delete-btn"
|
||||
data-id="{{item.id}}"
|
||||
data-name="{{item.name}}"
|
||||
bindtap="deleteWarehouse"
|
||||
size="mini"
|
||||
>删除</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -192,6 +206,33 @@
|
||||
type="number"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">坐标位置</text>
|
||||
<view class="coordinate-inputs">
|
||||
<view class="coordinate-row">
|
||||
<text class="coordinate-label">经度:</text>
|
||||
<input
|
||||
class="coordinate-input"
|
||||
placeholder="请输入经度"
|
||||
bindinput="onLongitudeInput"
|
||||
value="{{addForm.longitude}}"
|
||||
type="digit"
|
||||
/>
|
||||
</view>
|
||||
<view class="coordinate-row">
|
||||
<text class="coordinate-label">纬度:</text>
|
||||
<input
|
||||
class="coordinate-input"
|
||||
placeholder="请输入纬度"
|
||||
bindinput="onLatitudeInput"
|
||||
value="{{addForm.latitude}}"
|
||||
type="digit"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<button class="map-pick-btn" bindtap="pickLocationFromMap">地图选点</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-section">
|
||||
@@ -216,4 +257,127 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 编辑仓库页面 -->
|
||||
<view wx:if="{{currentTab === 'edit'}}" class="edit-page">
|
||||
<scroll-view class="form-container" scroll-y>
|
||||
<view class="form-section">
|
||||
<text class="section-title">编辑仓库信息</text>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">仓库名称 *</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入仓库名称"
|
||||
bindinput="onEditNameInput"
|
||||
value="{{editForm.name}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">仓库地址 *</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入仓库地址"
|
||||
bindinput="onEditAddressInput"
|
||||
value="{{editForm.address}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">联系人 *</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入联系人姓名"
|
||||
bindinput="onEditContactInput"
|
||||
value="{{editForm.contact}}"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">联系电话 *</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入联系电话"
|
||||
bindinput="onEditPhoneInput"
|
||||
value="{{editForm.phone}}"
|
||||
type="number"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">仓库容量</text>
|
||||
<input
|
||||
class="form-input"
|
||||
placeholder="请输入仓库容量(件数)"
|
||||
bindinput="onEditCapacityInput"
|
||||
value="{{editForm.capacity}}"
|
||||
type="number"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">坐标位置</text>
|
||||
<view class="coordinate-inputs">
|
||||
<view class="coordinate-row">
|
||||
<text class="coordinate-label">经度:</text>
|
||||
<input
|
||||
class="coordinate-input"
|
||||
placeholder="请输入经度"
|
||||
bindinput="onEditLongitudeInput"
|
||||
value="{{editForm.longitude}}"
|
||||
type="digit"
|
||||
/>
|
||||
</view>
|
||||
<view class="coordinate-row">
|
||||
<text class="coordinate-label">纬度:</text>
|
||||
<input
|
||||
class="coordinate-input"
|
||||
placeholder="请输入纬度"
|
||||
bindinput="onEditLatitudeInput"
|
||||
value="{{editForm.latitude}}"
|
||||
type="digit"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<button class="map-pick-btn" bindtap="pickLocationFromMap">地图选点</button>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">仓库状态</text>
|
||||
<picker
|
||||
class="form-picker"
|
||||
range="{{['营业中', '已关闭', '维护中']}}"
|
||||
value="{{editForm.status === 'open' ? 0 : editForm.status === 'closed' ? 1 : 2}}"
|
||||
bindchange="onEditStatusChange"
|
||||
>
|
||||
<view class="picker-value">
|
||||
{{editForm.status === 'open' ? '营业中' : editForm.status === 'closed' ? '已关闭' : '维护中'}}
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-section">
|
||||
<text class="section-title">其他信息</text>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">仓库描述</text>
|
||||
<textarea
|
||||
class="form-textarea"
|
||||
placeholder="请输入仓库描述信息(可选)"
|
||||
bindinput="onEditDescriptionInput"
|
||||
value="{{editForm.description}}"
|
||||
maxlength="200"
|
||||
/>
|
||||
<text class="textarea-counter">{{editForm.description ? editForm.description.length : 0}}/200</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-actions">
|
||||
<button class="submit-btn" bindtap="submitEditForm">更新仓库</button>
|
||||
<button class="cancel-btn" bindtap="cancelEdit">取消</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user