来源仓库:jxc/ai-fresh-delivery 来源提交:f0b1a180e2deb7e4673b9d1c8542619f7bc0f73d 快照树: 09f679334ff38f0ff25e907961c94a8223bcaedd(与来源 HEAD 工作树逐字节一致,3801 个文件) 按约定本仓库不带任何历史提交:来源仓库的历史中含真实凭据 (生产 SSH 私钥 deploy/id_rsa_tencent、server/.env、.env.tencent/.env.production/.env.gitea、 deploy/小程序AppSecret.txt,其中 MP_APPSECRET / S3 AccessKey 经哈希比对与线上同值), 整包推送会把这些凭据永久带入本仓库,故只取「当前版本」的单提交快照。 供应商系统后续开发自本提交开始。
231 lines
9.1 KiB
Plaintext
231 lines
9.1 KiB
Plaintext
<view class="page">
|
|
<view wx:if="{{loading}}" class="text-muted center-hint">加载订单中...</view>
|
|
<view wx:elif="{{error}}" class="text-error center-hint">{{error}}</view>
|
|
<view wx:else class="card">
|
|
<view class="detail-header">
|
|
<view>
|
|
<view class="detail-title">订单详情</view>
|
|
<view class="detail-code">{{order.order_code}}</view>
|
|
</view>
|
|
<view class="status-pill">{{statusLabel}}</view>
|
|
</view>
|
|
|
|
<view class="meta-grid">
|
|
<view class="meta-item">
|
|
<view class="meta-label">客户</view>
|
|
<view class="meta-value">{{order.company_name || '—'}}</view>
|
|
</view>
|
|
<view class="meta-item">
|
|
<view class="meta-label">下单时间</view>
|
|
<view class="meta-value">{{order.created_at_text || '—'}}</view>
|
|
</view>
|
|
<view class="meta-item">
|
|
<view class="meta-label">配送日</view>
|
|
<view class="meta-value">{{order.delivery_date || '—'}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="section-title">商品明细</view>
|
|
<view wx:if="{{editable}}" class="editable-hint">可调整分类,保存后写入客户映射库</view>
|
|
<view wx:else class="readonly-hint">订单已进入后续流程,仅可查看</view>
|
|
|
|
<view wx:if="{{categoryColumns.length}}" class="category-summary">
|
|
<scroll-view scroll-x class="category-summary-scroll" enable-flex>
|
|
<view class="category-summary-grid">
|
|
<view
|
|
wx:for="{{categoryColumns}}"
|
|
wx:key="name"
|
|
class="category-summary-col"
|
|
>
|
|
<view class="category-summary-name">{{item.name}}</view>
|
|
<view class="category-summary-count">{{item.count}}项</view>
|
|
</view>
|
|
<view class="category-summary-col category-summary-col-total">
|
|
<view class="category-summary-name">合计</view>
|
|
<view class="category-summary-count">{{categorySummaryTotalCount}}项</view>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
<view class="category-amount-list">
|
|
<view
|
|
wx:for="{{categoryColumns}}"
|
|
wx:key="name"
|
|
class="category-amount-item"
|
|
>{{item.name}} ¥{{item.amountText}}</view>
|
|
<view class="category-amount-total">总计 ¥{{categorySummaryTotalAmount}}</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="note-table">
|
|
<view class="note-tr note-tr-head">
|
|
<view class="note-td c-no">序号</view>
|
|
<view class="note-td c-name">商品名称</view>
|
|
<view class="note-td c-cat">分类</view>
|
|
<view class="note-td c-proc">描述</view>
|
|
<view class="note-td c-qty">数量</view>
|
|
<view class="note-td c-unit">单位</view>
|
|
<view class="note-td c-price">单价</view>
|
|
<view class="note-td c-amt">金额</view>
|
|
</view>
|
|
<block wx:for="{{itemGroups}}" wx:key="name" wx:for-item="group">
|
|
<view
|
|
wx:for="{{group.items}}"
|
|
wx:for-item="item"
|
|
wx:key="id"
|
|
class="note-item"
|
|
>
|
|
<view class="note-tr">
|
|
<view class="note-td c-no">{{item._rowNo}}</view>
|
|
<view class="note-td c-name">
|
|
<view
|
|
class="cell-text cell-text-left {{editable ? 'cell-editable' : ''}}"
|
|
data-index="{{item._itemIndex}}"
|
|
data-field="name"
|
|
bindtap="openItemEdit"
|
|
>{{item.item_name || '—'}}</view>
|
|
</view>
|
|
<view class="note-td c-cat">
|
|
<picker
|
|
wx:if="{{editable}}"
|
|
class="cat-box cell-editable"
|
|
mode="selector"
|
|
range="{{categoryPickerLabels}}"
|
|
data-index="{{item._itemIndex}}"
|
|
bindchange="onCategoryPick"
|
|
>
|
|
<view class="cat-box-text {{item.category_code ? '' : 'cat-empty'}}">{{item.category_label || '未分类'}}</view>
|
|
</picker>
|
|
<view wx:else class="cat-box-text">{{item.category_label || item.category_name || '未分类'}}</view>
|
|
</view>
|
|
<view class="note-td c-proc">
|
|
<picker
|
|
wx:if="{{editable}}"
|
|
mode="selector"
|
|
range="{{processingMethods}}"
|
|
data-index="{{item._itemIndex}}"
|
|
bindchange="onProcessingMethodPick"
|
|
>
|
|
<view class="cell-text {{editable ? 'cell-editable' : ''}}">{{item.processing_method || '原材料'}}</view>
|
|
</picker>
|
|
<view wx:else class="cell-text">{{item.processing_method || '原材料'}}</view>
|
|
</view>
|
|
<view class="note-td c-qty">
|
|
<view
|
|
class="cell-text {{editable ? 'cell-editable' : ''}}"
|
|
data-index="{{item._itemIndex}}"
|
|
data-field="qty"
|
|
bindtap="openItemEdit"
|
|
>{{item.quantity}}</view>
|
|
</view>
|
|
<view class="note-td c-unit">
|
|
<view
|
|
class="cell-text {{editable ? 'cell-editable' : ''}}"
|
|
data-index="{{item._itemIndex}}"
|
|
data-field="unit"
|
|
bindtap="openItemEdit"
|
|
>{{item.unit}}</view>
|
|
</view>
|
|
<view class="note-td c-price">
|
|
<view
|
|
class="cell-text {{editable ? 'cell-editable' : ''}}"
|
|
data-index="{{item._itemIndex}}"
|
|
data-field="price"
|
|
bindtap="openItemEdit"
|
|
>{{item.price}}</view>
|
|
</view>
|
|
<view class="note-td c-amt">¥{{item.amountText}}</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<view class="note-tr note-tr-total">
|
|
<view class="note-td note-td-span">合计: {{categorySummaryTotalAmount}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{!loading && !error}}" class="action-dock">
|
|
<view class="action-row">
|
|
<button wx:if="{{editable}}" class="btn-primary action-btn" loading="{{saving}}" bindtap="saveAdjustments">保存调整</button>
|
|
<button class="btn-secondary action-btn" bindtap="goHome">返回首页</button>
|
|
<button class="btn-secondary action-btn" bindtap="continueEntry">继续录单</button>
|
|
</view>
|
|
<view class="action-safe"></view>
|
|
</view>
|
|
|
|
<view wx:if="{{showItemEditModal}}" class="modal-mask" catchtouchmove="stopModalTap">
|
|
<view class="modal-card item-edit-card" catchtap="stopModalTap">
|
|
<view class="modal-title">{{editable ? '修改商品' : '商品信息'}}</view>
|
|
<view class="modal-label">商品名称</view>
|
|
<input
|
|
class="modal-input"
|
|
placeholder="商品名称"
|
|
value="{{itemEditName}}"
|
|
disabled="{{!editable}}"
|
|
focus="{{itemEditFocus === 'name'}}"
|
|
adjust-position="{{true}}"
|
|
hold-keyboard="{{true}}"
|
|
data-field="itemEditName"
|
|
bindinput="onItemEditField"
|
|
bindblur="onItemEditBlur"
|
|
/>
|
|
<view class="modal-label">数量</view>
|
|
<input
|
|
class="modal-input"
|
|
type="digit"
|
|
placeholder="数量"
|
|
value="{{itemEditQty}}"
|
|
disabled="{{!editable}}"
|
|
focus="{{itemEditFocus === 'qty'}}"
|
|
adjust-position="{{true}}"
|
|
hold-keyboard="{{true}}"
|
|
data-field="itemEditQty"
|
|
bindinput="onItemEditField"
|
|
bindblur="onItemEditBlur"
|
|
/>
|
|
<view class="modal-label">单位</view>
|
|
<input
|
|
class="modal-input"
|
|
placeholder="单位"
|
|
value="{{itemEditUnit}}"
|
|
disabled="{{!editable}}"
|
|
focus="{{itemEditFocus === 'unit'}}"
|
|
adjust-position="{{true}}"
|
|
hold-keyboard="{{true}}"
|
|
data-field="itemEditUnit"
|
|
bindinput="onItemEditField"
|
|
bindblur="onItemEditBlur"
|
|
/>
|
|
<view class="modal-label">单价</view>
|
|
<input
|
|
class="modal-input"
|
|
type="digit"
|
|
placeholder="单价"
|
|
value="{{itemEditPrice}}"
|
|
disabled="{{!editable}}"
|
|
focus="{{itemEditFocus === 'price'}}"
|
|
adjust-position="{{true}}"
|
|
hold-keyboard="{{true}}"
|
|
data-field="itemEditPrice"
|
|
bindinput="onItemEditField"
|
|
bindblur="onItemEditBlur"
|
|
/>
|
|
<view class="modal-amount">金额 ¥{{itemEditAmount}}</view>
|
|
<view class="modal-actions">
|
|
<button class="btn-secondary modal-btn" catchtap="closeItemEditModal">{{editable ? '取消' : '关闭'}}</button>
|
|
<button wx:if="{{editable}}" class="btn-primary modal-btn" catchtap="submitItemEdit">确定</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view wx:if="{{showQuickCategoryModal}}" class="modal-mask" catchtouchmove="stopModalTap">
|
|
<view class="modal-card" catchtap="stopModalTap">
|
|
<view class="modal-title">新建分类</view>
|
|
<input class="modal-input" placeholder="分类名称" value="{{quickCategoryName}}" bindinput="onQuickCategoryNameInput" />
|
|
<view class="modal-actions">
|
|
<button class="btn-secondary modal-btn" bindtap="closeQuickCategoryModal">取消</button>
|
|
<button class="btn-primary modal-btn" loading="{{creatingCategory}}" bindtap="submitQuickCategory">创建</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|