c6206787da
项目结构: - backend/ Python FastAPI 后端 - uni-app/ uni-app跨端前端 - docs/ 设计文档 - docker-compose.yml Docker编排 - nginx/scripts/systemd 运维配置 已完成功能: - 用户认证 (JWT) - 智能翻译 + 回复建议 - 营销素材生成 - 客户管理 + 沉默检测 - 报价单管理 - 产品库管理 - 汇率换算 - 推送通知 (uni-push) - WhatsApp Webhook框架 - Celery定时任务
89 lines
3.9 KiB
Plaintext
89 lines
3.9 KiB
Plaintext
<view class="container">
|
||
<view class="header">
|
||
<text class="section-title">报价单</text>
|
||
<button class="add-btn" bindtap="showCreate">+ 新建报价</button>
|
||
</view>
|
||
|
||
<view class="quotation-list">
|
||
<view class="quotation-item" wx:for="{{quotations}}" wx:key="id" bindtap="viewDetail" data-id="{{item.id}}">
|
||
<view class="quotation-header">
|
||
<text class="quotation-title">{{item.title || '报价单'}}</text>
|
||
<view class="quotation-status status-{{item.status}}">
|
||
{{item.status === 'draft' ? '草稿' : item.status === 'sent' ? '已发送' : '已接受'}}
|
||
</view>
|
||
</view>
|
||
<view class="quotation-info">
|
||
货币: {{item.currency}} ·条款: {{item.delivery_terms}}
|
||
</view>
|
||
<view class="quotation-total">
|
||
合计: ${{item.total || 0}}
|
||
</view>
|
||
</view>
|
||
|
||
<view class="empty" wx:if="{{quotations.length === 0 && !loading}}">
|
||
<text>暂无报价单,点击上方创建</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="modal" wx:if="{{showCreateModal}}" bindtap="hideCreate">
|
||
<view class="modal-content" catchtap>
|
||
<view class="modal-title">新建报价单</view>
|
||
|
||
<view class="form-group">
|
||
<text class="form-label">客户 *</text>
|
||
<picker bindchange="onCustomerChange" value="{{customerIndex}}" range="{{customers}}" range-key="name">
|
||
<view class="form-input">
|
||
{{customers[customerIndex] ? customers[customerIndex].name : '请选择客户'}}
|
||
</view>
|
||
</picker>
|
||
</view>
|
||
|
||
<view class="form-group">
|
||
<text class="form-label">标题</text>
|
||
<input class="form-input" placeholder="报价单标题" value="{{newQuotation.title}}" data-field="title" bindinput="onInput" />
|
||
</view>
|
||
|
||
<view class="items-section">
|
||
<text class="form-label">产品明细</text>
|
||
<view class="item-row" wx:for="{{newQuotation.items}}" wx:key="index">
|
||
<text>{{item.product_name}}</text>
|
||
<text>x{{item.quantity}}</text>
|
||
<text>${{item.unit_price}}</text>
|
||
<text class="remove-item" data-index="{{index}}" bindtap="removeItem">×</text>
|
||
</view>
|
||
|
||
<view class="item-row">
|
||
<input class="form-input item-input" placeholder="产品名称" value="{{tempItem.product_name}}" data-field="product_name" bindinput="onItemInput" />
|
||
<input class="form-input qty-input" type="number" placeholder="数量" value="{{tempItem.quantity}}" data-field="quantity" bindinput="onItemInput" />
|
||
<input class="form-input price-input" type="digit" placeholder="单价" value="{{tempItem.unit_price}}" data-field="unit_price" bindinput="onItemInput" />
|
||
</view>
|
||
<view class="add-item-btn" bindtap="addItem">+ 添加产品</view>
|
||
</view>
|
||
|
||
<view class="form-group">
|
||
<text class="form-label">货币</text>
|
||
<input class="form-input" placeholder="USD" value="{{newQuotation.currency}}" data-field="currency" bindinput="onInput" />
|
||
</view>
|
||
|
||
<view class="form-group">
|
||
<text class="form-label">付款条款</text>
|
||
<input class="form-input" placeholder="T/T 30% deposit" value="{{newQuotation.payment_terms}}" data-field="payment_terms" bindinput="onInput" />
|
||
</view>
|
||
|
||
<view class="form-group">
|
||
<text class="form-label">交货条款</text>
|
||
<input class="form-input" placeholder="FOB" value="{{newQuotation.delivery_terms}}" data-field="delivery_terms" bindinput="onInput" />
|
||
</view>
|
||
|
||
<view class="form-group">
|
||
<text class="form-label">交货周期</text>
|
||
<input class="form-input" placeholder="如:25 days" value="{{newQuotation.lead_time}}" data-field="lead_time" bindinput="onInput" />
|
||
</view>
|
||
|
||
<view class="modal-btns">
|
||
<view class="modal-btn btn-cancel" bindtap="hideCreate">取消</view>
|
||
<view class="modal-btn btn-confirm" bindtap="createQuotation">创建</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view> |