- .cursor/rules + AGENTS.md:供应商二次开发的隔离硬规则落库(库/端口/上传目录/对象前缀) - 部署与本地配置:docker-compose*.yml、.env.*.example(仅占位值)、start-split-native / sync-prod-db-to-local 脚本 - 小程序:入库归档识别(stockInboundArchive + 识别与入库面板改动) - tools:设计门禁脚本(check-migrations / run-all / verify-facts)与架构图脚本更新 - docs:跨系统改价改量审核、第三方订单退货跟随、免入库推进、500+ 分公司规模改造、 拍照入库识别与档案回写等设计文档;对接清单新增 §4.5.4 我方回执(第六批端到端) - server:存量修数脚本(legacy CS / 供应商应付 / 结算口径)、采购耳标核对脚本; 新增测试:入库归档回写、租户优选顺序、规模并发
115 lines
5.5 KiB
Plaintext
115 lines
5.5 KiB
Plaintext
<view class="page {{embedded ? 'is-embedded' : ''}}">
|
||
|
||
|
||
<view class="card">
|
||
<view class="section">图片识别</view>
|
||
<image wx:if="{{imagePreview}}" class="preview" src="{{imagePreview}}" mode="aspectFit" />
|
||
<view class="row">
|
||
<view class="btn ghost flex" bindtap="chooseImageFromCamera">{{recognizing ? '识别中…' : '拍照'}}</view>
|
||
<view class="btn ghost flex" bindtap="chooseImageFromAlbum">相册</view>
|
||
</view>
|
||
<view wx:if="{{imagePreview}}" class="link" bindtap="clearRecognizePreview">清除图片</view>
|
||
</view>
|
||
|
||
<view class="card">
|
||
<view class="section">入库信息</view>
|
||
<view class="label">商品名</view>
|
||
<view class="combo">
|
||
<input
|
||
class="input combo-input"
|
||
value="{{nameQuery}}"
|
||
bindinput="onNameQuery"
|
||
bindfocus="onNameFocus"
|
||
placeholder=""
|
||
/>
|
||
<view wx:if="{{dropdownOpen}}" class="dropdown">
|
||
<view wx:if="{{searching}}" class="dropdown-empty">搜索中…</view>
|
||
<block wx:for="{{similar}}" wx:key="sku_code">
|
||
<view class="dropdown-item" data-idx="{{index}}" bindtap="onPickSimilar">
|
||
<view class="dropdown-name">{{item.sku_name}}</view>
|
||
<view class="dropdown-meta">{{item.spec || '无规格'}}{{item.unit ? ' · ' + item.unit : ''}}{{item.quote_cost ? ' · 报价 ¥' + item.quote_cost : ''}}</view>
|
||
</view>
|
||
</block>
|
||
<view wx:if="{{showCreateHint}}" class="dropdown-create" bindtap="onCreateFromQuery">
|
||
没有匹配,新建「{{nameQuery}}」
|
||
</view>
|
||
<view wx:if="{{!searching && !similar.length && !showCreateHint}}" class="dropdown-empty">输入品名搜索</view>
|
||
</view>
|
||
</view>
|
||
<view class="sku-row">
|
||
<text class="sku-label">商品编码</text>
|
||
<text class="sku-value">{{skuCode || '选中或新建后自动生成'}}</text>
|
||
</view>
|
||
|
||
<view class="label">规格</view>
|
||
<input class="input" value="{{archiveSpec}}" bindinput="onArchiveSpec" placeholder="识别后可修改,改动才回写档案" />
|
||
<view class="label">品牌</view>
|
||
<input class="input" value="{{archiveBrand}}" bindinput="onArchiveBrand" placeholder="识别后可修改,改动才回写档案" />
|
||
<view class="label">厂家/产地</view>
|
||
<input class="input" value="{{archiveOrigin}}" bindinput="onArchiveOrigin" placeholder="识别后可修改,改动才回写档案" />
|
||
<view wx:if="{{archiveEditHint}}" class="hint">{{archiveEditHint}}</view>
|
||
|
||
<view class="label">数量 *</view>
|
||
<view class="qty-row">
|
||
<view class="qty-field qty-field--grow">
|
||
<input class="qty-field-input" type="digit" value="{{qty}}" bindinput="onQty" placeholder="入库数量" />
|
||
</view>
|
||
<picker class="qty-field qty-field--unit" mode="selector" range="{{unitOptions}}" value="{{unitIndex}}" bindchange="onInboundUnitChange">
|
||
<view class="unit-select">{{skuUnit || '单位'}} ▾</view>
|
||
</picker>
|
||
</view>
|
||
<view class="label">成本价 *(须大于 0)</view>
|
||
<input class="input" type="digit" value="{{unitCost}}" bindinput="onUnitCost" />
|
||
<view class="label">生产日期</view>
|
||
<picker mode="date" value="{{productionDate}}" end="{{productionDateEnd}}" bindchange="onProd">
|
||
<view class="picker">{{productionDate || '请选择生产日期'}} ▾</view>
|
||
</picker>
|
||
<view class="btn" bindtap="onSubmit">确认入库</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:if="{{createOpen}}" class="mask" catchtap="closeCreate">
|
||
<view class="modal {{embedded ? 'modal--embedded' : ''}}" catchtap="noop">
|
||
<view class="section">新建商品</view>
|
||
<view class="hint">编码保存后自动生成,默认管库存</view>
|
||
<view class="label">分类 *</view>
|
||
<view class="combo combo--modal">
|
||
<input
|
||
class="input combo-input"
|
||
value="{{categoryQuery}}"
|
||
placeholder="输入搜索,没有则新建"
|
||
bindfocus="onCategoryFocus"
|
||
bindinput="onCategoryInput"
|
||
bindblur="onCategoryBlur"
|
||
/>
|
||
<view wx:if="{{categoryDropdownOpen}}" class="dropdown">
|
||
<block wx:for="{{categorySuggestions}}" wx:key="category_code">
|
||
<view class="dropdown-item" data-idx="{{index}}" catchtap="pickCategory">
|
||
<view class="dropdown-name">{{item.category_name || item.label || item.category_code}}</view>
|
||
</view>
|
||
</block>
|
||
<view wx:if="{{categoryCanCreate}}" class="dropdown-create" catchtap="createCategoryFromQuery">
|
||
没有匹配,新建「{{categoryQuery}}」
|
||
</view>
|
||
<view wx:if="{{!categorySuggestions.length && !categoryCanCreate}}" class="dropdown-empty">输入分类名称搜索</view>
|
||
</view>
|
||
</view>
|
||
<view class="label">品名 *</view>
|
||
<input class="input" value="{{newName}}" bindinput="onNewName" />
|
||
<view class="label">规格 *</view>
|
||
<input class="input" value="{{newSpec}}" bindinput="onNewSpec" />
|
||
<view class="label">品牌</view>
|
||
<input class="input" value="{{newBrand}}" bindinput="onNewBrand" />
|
||
<view class="label">单位</view>
|
||
<picker mode="selector" range="{{unitOptions}}" value="{{unitIndex}}" bindchange="onInboundUnitChange">
|
||
<view class="picker">{{skuUnit || '请选择单位'}} ▾</view>
|
||
</picker>
|
||
<view class="label">产地</view>
|
||
<input class="input" value="{{newOrigin}}" bindinput="onNewOrigin" />
|
||
<view class="row">
|
||
<view class="btn ghost flex" bindtap="closeCreate">取消</view>
|
||
<view class="btn flex" bindtap="onCreateProduct">保存</view>
|
||
</view>
|
||
</view>
|
||
</view>
|