feat: 添加组件配置文件并优化页面结构
- 新增 components.d.json 文件,包含所有组件的属性配置 - 添加 card-item-plugin 组件及其相关文件(json、ts、wxml、wxss) - 在 app.json 中添加新的生产流程管理页面路径 - 添加多个SVG图标文件用于菜单项 - 重构 popup-plugin 组件样式和关闭逻辑 - 更新 tab-bar-plugin 的激活状态逻辑 - 优化 search-popup 使用全局样式类 - 在首页添加菜单配置和页面跳转功能 - 调整组件样式细节和间距
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "录入流程",
|
||||
"navigationBarTitleText": "流程录入",
|
||||
"usingComponents": {
|
||||
"t-input": "tdesign-miniprogram/input/input",
|
||||
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"popup-plugin": "/pages/components/popup-plugin/popup-plugin"
|
||||
"popup-plugin": "/pages/components/popup-plugin/popup-plugin",
|
||||
"tab-bar-plugin": "/pages/components/tab-bar-plugin/tab-bar-plugin"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<page-plugin is-login="{{isLogin}}" is-auth="{{authInfo['SF_ENTER_PROCESS']}}" loading="{{loading}}"
|
||||
bind:handleLogin="handleLogin" style="padding: 0;">
|
||||
<page-plugin
|
||||
is-login="{{isLogin}}"
|
||||
is-auth="{{authInfo['SF_ENTER_PROCESS']}}"
|
||||
loading="{{loading}}"
|
||||
bind:handleLogin="handleLogin"
|
||||
customStyle="padding: 0;"
|
||||
>
|
||||
<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;">
|
||||
@@ -9,27 +14,28 @@
|
||||
</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 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.code == selectedProcessCode || (item.code + '-') == selectedProcessCode ? 'active': ''}}" bind:tap="processItemTap" data-code="{{item.code}}">{{item.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'}};">
|
||||
{{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>
|
||||
<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>
|
||||
@@ -39,15 +45,24 @@
|
||||
<!-- <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>
|
||||
<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: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}}
|
||||
@@ -57,8 +72,12 @@
|
||||
|
||||
</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;">
|
||||
<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>
|
||||
{{item.msg}}
|
||||
</view>
|
||||
@@ -108,4 +127,7 @@
|
||||
</view>
|
||||
</popup-plugin> -->
|
||||
</view>
|
||||
|
||||
</page-plugin>
|
||||
<tab-bar-plugin active="scan" />
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
/* height: calc(100vh - 50px - env(safe-area-inset-bottom)); */
|
||||
height: calc(100vh - var(--td-tab-bar-height, 80rpx) - env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.process-item {
|
||||
|
||||
Reference in New Issue
Block a user