Files
FreeERP.Applet/miniprogram/pages/processEntry/processEntry.wxml
2026-01-21 17:05:30 +08:00

133 lines
6.4 KiB
Plaintext

<page-plugin is-login="{{isLogin}}" is-auth="{{authInfo['SF_ERP_PRODUCT_PROCESS_ENTER']}}"
loading="{{loading}}" bind:handleLogin="handleLogin" customStyle="padding: 0;" hasTabBar="1">
<view class="container">
<view style="display: flex;padding: 24rpx 24rpx 8rpx 24rpx;">
<view
style="display: flex;flex-shrink: 0;flex-direction: column;margin-right: 24rpx;align-items: flex-end;">
<view style="margin-bottom: 8rpx;font-weight: bold;">工序:</view>
<view>
<t-checkbox style="padding: 0;" checked="{{ backFlag }}" bind:change="backChange">撤回
</t-checkbox>
</view>
</view>
<view
style="display: flex;flex-wrap: wrap;min-height: 44px;max-height: 88px;overflow: auto;flex: 1;">
<view wx:if="{{processItems.length == 0}}"
style="display: flex;justify-content: center;height: 100%;width: 100%;align-items: center;color: #999;">
暂无工序
</view>
<block wx:for="{{processItems}}" wx:key="process_id">
<view
class="process-item {{item.process_code == selectedProcessCode || (item.process_code + '-') == selectedProcessCode ? 'active': ''}}"
bind:tap="processItemTap" data-code="{{item.process_code}}">{{item.process_name}}</view>
</block>
</view>
</view>
<t-input label="订单编号" value="{{rel_order_no}}" readonly placeholder="扫码流程编码, 订单编号" />
<t-input label="流程编码" readonly value="{{process_code}}" />
<view wx:if="{{processCodeMsg}}"
style="padding: 16rpx 24rpx 0 24rpx;color: {{action == 'end'? '#52c41a': '#ff4d4f'}};">
{{processCodeMsg}}
</view>
<view style="padding: 24rpx;padding-top: 0;">
<view style="display: flex;justify-content: center;margin-top: 24rpx;align-items: center;">
<t-button theme="primary" custom-style="margin-right: 32rpx" bind:tap="scanCode" icon="qr">
扫码</t-button>
<t-button theme="primary" disabled="{{!(rel_order_no && process_code)}}"
bind:tap="processEnter">录入流程</t-button>
<!-- <view style="width: 16px;"></view> -->
<!-- <van-checkbox value="{{voice}}" bind:change="voiceChange">语音播报</van-checkbox> -->
</view>
</view>
<view class="log-header">
<!-- <text>扫码记录</text> -->
<text bind:tap="addMsg2">扫码结果</text>
<view>
<t-button size="extra-small" theme="{{logType == '0' ? 'primary' :'default'}}"
bind:tap="onLogTypeChange" data-key="0">图标
</t-button>
<t-button size="extra-small" theme="{{logType == '1' ? 'primary' :'default'}}"
bind:tap="onLogTypeChange" data-key="1">记录
</t-button>
</view>
<!-- <t-button size="extra-small" theme="primary" bind:tap="clearMsg">清空</t-button> -->
</view>
<view wx:if="{{logType == 0}}" class="log-box"
style="display: flex;justify-content: center;align-items: center;font-size: 65vw;">
<!-- <view wx:for="{{logsList}}" wx:for-item="item" wx:key="date" style="font-size: 14px;word-break: break-all;margin-bottom: 8px;width: 100%;align-items: flex-start;">
{{item.date}}
{{item.msg}}
</view> -->
<t-icon wx:if="{{result == 'success'}}" name="check" style="color: #07c160;" />
<t-icon wx:elif="{{result == 'error'}}" name="close" style="color: #ee0a24;" />
</view>
<view wx:else class="log-box">
<view wx:for="{{logsList}}" wx:for-item="item" wx:key="date"
style="word-break: break-all;margin-bottom: 16rpx;width: 100%;align-items: flex-start;">
<text style="color: #666;margin-right: 8rpx;">{{item.date}}</text>
{{item.msg}}
</view>
</view>
<popup-plugin visible="{{ show }}" bind:close="onClose" title="订单流程完成">
<view style="padding: 24rpx;">
<view wx:for="{{orders}}" wx:key="rel_order_no"
style="border: 1rpx solid #ddd;border-radius: 8rpx;display: flex;flex-direction: column;margin-bottom: 24rpx;">
<view style="padding: 16rpx;">
<card-item-plugin label="销售单号" value="{{item.order_no}}" />
<card-item-plugin label="自定义单号" value="{{item.custom_order_no}}" />
<card-item-plugin label="流程名称" value="{{item.p_process_name}}" />
<card-item-plugin label="自定义名称" wx:if="{{item.process_custom_no}}"
value="{{item.process_custom_no}}" />
<card-item-plugin label="工序名称" value="{{item.c_process_name}}" />
<card-item-plugin label="材料名称" wx:if="{{item.sale_info_str}}"
value="{{item.sale_info_str}}" />
<card-item-plugin wx:if="{{item.product_info_str}}" label="房柜名称"
value="{{item.product_info_str}}" />
<card-item-plugin label="产品名称" value="{{item.goods_name}}" />
</view>
<view
style="display: flex;border-top: 1rpx solid #ddd;padding: 16rpx;justify-content: center;">
<block wx:if="{{action == 'end'}}">
<t-button size='small' theme="primary" data-index="{{index}}"
bind:tap="LCProcessEnter">
完成</t-button>
</block>
<block wx:else>
<t-button size='small' theme="danger" data-index="{{index}}"
bind:tap="LCProcessEnter">
撤回
</t-button>
</block>
</view>
</view>
</view>
</popup-plugin>
<!-- <popup-plugin show="{{ showDefaultBonus }}" bind:close="closeDefaultBonusHandle" title="选择提成配置">
<view class="table">
<view class="tr">
<view class="th">自定义字段</view>
<view class="th">提成编码</view>
<view class="th" style="width: 80px;">操作</view>
</view>
<block wx:for="{{defaultBonusConfigKeys}}" wx:key="index" wx:for-item="key">
<view wx:for="{{defaultBonusConfig[key]}}" class="tr" wx:key="key">
<view class="td">{{item.key}}</view>
<view class="td">{{item.bonus_code}}</view>
<view class="td">
<t-button size="small" type="primary" data-order_no="{{key}}" data-key="{{item.bonus_code}}"
bind:tap="onSelectBonus">选择</t-button>
</view>
</view>
</block>
</view>
</popup-plugin> -->
</view>
</page-plugin>
<tab-bar-plugin active="scan" />