添加组件及页面

This commit is contained in:
zhengw
2026-01-21 17:05:30 +08:00
parent a89e69c381
commit 7ff1a911dd
54 changed files with 1078 additions and 1009 deletions

View File

@@ -1,41 +1,41 @@
<page-plugin
is-login="{{isLogin}}"
is-auth="{{authInfo['SF_ENTER_PROCESS']}}"
loading="{{loading}}"
bind:handleLogin="handleLogin"
customStyle="padding: 0;"
>
<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: 12px 12px 4px 12px;">
<view style="display: flex;flex-shrink: 0;flex-direction: column;margin-right: 12px;align-items: flex-end;">
<view style="margin-bottom: 4px;font-weight: bold;">工序:</view>
<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;" value="{{ backFlag }}" bind:change="backChange">撤回</t-checkbox>
<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
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.code == selectedProcessCode || (item.code + '-') == selectedProcessCode ? 'active': ''}}" bind:tap="processItemTap" data-code="{{item.code}}">{{item.name}}</view>
<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="订单编号" value="{{rel_order_no}}" readonly placeholder="扫码流程编码, 订单编号" />
<t-input label="流程编码" readonly value="{{process_code}}" />
<view wx:if="{{processCodeMsg}}" style="padding: 8px 12px 0 12px;color: {{action == 'end'? '#52c41a': '#ff4d4f'}};">
<view wx:if="{{processCodeMsg}}"
style="padding: 16rpx 24rpx 0 24rpx;color: {{action == 'end'? '#52c41a': '#ff4d4f'}};">
{{processCodeMsg}}
</view>
<view style="padding: 12px;padding-top: 0;">
<view style="display: flex;justify-content: center;margin-top: 12px;align-items: center;column-gap: 16px;">
<t-button theme="primary" bind:tap="scanCode" icon="qr">扫码</t-button>
<t-button theme="primary" disabled="{{!(rel_order_no && process_code)}}" bind:tap="processEnter">流程录入</t-button>
<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>
@@ -45,24 +45,17 @@
<!-- <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 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 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: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}}
@@ -72,37 +65,45 @@
</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: 8px;width: 100%;align-items: flex-start;"
>
<text style="color: #666;margin-right: 4px;">{{item.date}}</text>
<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 wx:for="{{orders}}" wx:key="rel_order_no"
style="border: 1rpx solid #ddd;border-radius: 4px;display: flex;flex-direction: column;margin-bottom: 12px;">
<view style="padding: 8px;">
<list-item label="流程单号" value="{{item.rel_order_no}}" />
<list-item label="流程名称" value="{{item.p_process_name}}" />
<list-item label="自定义名称" wx:if="{{item.process_custom_no}}" value="{{item.process_custom_no}}" />
<list-item label="工序名称" value="{{item.c_process_name}}" />
<list-item label="材料名称" wx:if="{{item.sale_info_str}}" value="{{item.sale_info_str}}" />
<list-item wx:if="{{item.product_info_str}}" label="房柜名称" value="{{item.product_info_str}}" />
<list-item label="状态" value="{{item.state== 2 ? '已完成' :''}}" />
<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>
<view style="display: flex;border-top: 1rpx solid #ddd;padding: 8px;justify-content: center;">
<block wx:if="{{action == 'end'}}">
<t-button size='small' type="primary" data-index="{{index}}" bind:tap="LCProcessEnter">完成</t-button>
</block>
<block wx:else>
<t-button size='small' type="danger" data-index="{{index}}" bind:tap="LCProcessEnter">撤回</t-button>
</block>
</view>
</view> -->
</popup-plugin>
<!-- <popup-plugin show="{{ showDefaultBonus }}" bind:close="closeDefaultBonusHandle" title="选择提成配置">
@@ -129,5 +130,4 @@
</view>
</page-plugin>
<tab-bar-plugin active="scan" />
<tab-bar-plugin active="scan" />