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:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
Component({
|
||||
options: { multipleSlots: true },
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
label: null,
|
||||
value: null,
|
||||
customStyle: null,
|
||||
labelStyle: null,
|
||||
valueStyle: null,
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<view class="card-item" style="{{ customStyle }}">
|
||||
<view class="label" style="{{ labelStyle }}">
|
||||
{{ label || '' }}
|
||||
<slot name="label" />
|
||||
</view>
|
||||
<view class="value" style="{{ valueStyle }}">
|
||||
{{ value || '' }}
|
||||
<slot name="value" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
.card-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
line-height: 1.57;
|
||||
}
|
||||
|
||||
.label,
|
||||
.value {
|
||||
min-width: 0;
|
||||
word-break: break-all;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.label {
|
||||
width: var(--label-width, 5em);
|
||||
}
|
||||
|
||||
.value {
|
||||
flex: 1;
|
||||
display: inline-flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
@@ -27,6 +27,7 @@ Component({
|
||||
*/
|
||||
data: {
|
||||
showMore: false,
|
||||
showMoreBar: false,
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<view class="card_plugin {{className}}" style="border: 1rpx solid #ddd;margin-bottom: 12px;border-radius: 4px;{{style}};{{customStyle}}" bind:tap="click">
|
||||
<view class="card_plugin {{className}}" style="border: 1rpx solid #ddd;margin-bottom: 12px;border-radius: 4px;{{customStyle}}" bind:tap="click">
|
||||
<view class="header" style="border-bottom: 1rpx solid #ddd;padding: 8px 12px;font-weight: bold;{{headerStyle || ''}}">
|
||||
<slot name="header" />
|
||||
</view>
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer > view {
|
||||
.footer>view {
|
||||
border-top: 1rpx solid #ddd;
|
||||
padding: 8px 0 0 12px;
|
||||
padding: 16rpx 0 0 24rpx;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.footer > view:empty {
|
||||
.footer>view:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
height: 26px;
|
||||
font-size: 0.875em;
|
||||
height: 52rpx;
|
||||
}
|
||||
|
||||
.show-more:active {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"t-popup": "tdesign-miniprogram/popup/popup"
|
||||
"t-popup": "tdesign-miniprogram/popup/popup",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,9 @@ Component({
|
||||
this.triggerEvent("close");
|
||||
}
|
||||
},
|
||||
onClose() {
|
||||
this.setData({ open: false });
|
||||
this.triggerEvent("close");
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
<t-popup
|
||||
visible="{{visible}}"
|
||||
bind:visible-change="onVisibleChange"
|
||||
placement="{{placement || 'bottom'}}"
|
||||
close-btn
|
||||
>
|
||||
<view style="border-bottom: 1px solid #ddd;">
|
||||
<view style="padding: 12px 12px;">{{title}}</view>
|
||||
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="{{placement || 'bottom'}}">
|
||||
<view class="p-header">
|
||||
<view class="title">{{title}}</view>
|
||||
<t-icon name="close" size="60rpx" bind:tap="onClose" />
|
||||
</view>
|
||||
<view style="max-height: 70vh;overflow: auto;">
|
||||
<slot/>
|
||||
|
||||
@@ -1 +1,18 @@
|
||||
.title {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: var(--td-text-color-primary);
|
||||
}
|
||||
|
||||
.p-header {
|
||||
border-bottom: 1rpx solid #ddd;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-right: calc(var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx)) * 0.5);
|
||||
padding-left: calc(var(--td-popup-border-radius, var(--td-radius-extraLarge, 24rpx)) * 0.5);
|
||||
padding-top: 12rpx;
|
||||
padding-bottom: 12rpx;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Component({
|
||||
options: { multipleSlots: true },
|
||||
options: { multipleSlots: true, addGlobalClass: true },
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
|
||||
@@ -1,61 +1,60 @@
|
||||
<view style="display: flex;align-items: center;margin-bottom: 12px;{{customStyle}}">
|
||||
<view style="flex: 1;margin-right: {{hideMore ? 0 : '12px'}};">
|
||||
<block wx:if="{{useInputSlot}}">
|
||||
<slot name='input' />
|
||||
</block>
|
||||
<block wx:else>
|
||||
<t-input
|
||||
wx:if="{{!hideInput}}"
|
||||
placeholder="{{placeholder || '请输入关键字'}}"
|
||||
clearable
|
||||
borderless
|
||||
bindchange="change"
|
||||
value="{{value || ''}}"
|
||||
data-key="{{dataKey}}"
|
||||
confirm-type="search"
|
||||
bind:clear="clear"
|
||||
custom-style="background:#f5f5f5;min-height: 34px;height:34px;padding: 0;"
|
||||
size="small"
|
||||
>
|
||||
<t-button
|
||||
name="search"
|
||||
slot="prefix-icon"
|
||||
size="small"
|
||||
theme="primary"
|
||||
bindtap="scanCode"
|
||||
icon="scan"
|
||||
/>
|
||||
<t-button
|
||||
slot="suffix-icon"
|
||||
bindtap="search"
|
||||
icon="search"
|
||||
theme="primary"
|
||||
size="small"
|
||||
/>
|
||||
</t-input>
|
||||
</block>
|
||||
</view>
|
||||
<t-button
|
||||
wx:if="{{!hideMore}}"
|
||||
bindtap="showSearch"
|
||||
theme="primary"
|
||||
size="small"
|
||||
>
|
||||
筛选
|
||||
</t-button>
|
||||
<view style="flex: 1;margin-right: {{hideMore ? 0 : '12px'}};">
|
||||
<block wx:if="{{useInputSlot}}">
|
||||
<slot name='input' />
|
||||
</block>
|
||||
<block wx:else>
|
||||
<t-input
|
||||
wx:if="{{!hideInput}}"
|
||||
placeholder="{{placeholder || '请输入关键字'}}"
|
||||
clearable
|
||||
borderless
|
||||
bindchange="change"
|
||||
value="{{value || ''}}"
|
||||
data-key="{{dataKey}}"
|
||||
confirm-type="search"
|
||||
bind:clear="clear"
|
||||
custom-style="background:#f5f5f5;min-height: var(--td-button-small-height,64rpx);height:var(--td-button-small-height,64rpx);padding: 0;"
|
||||
size="small"
|
||||
t-class="aaaaaa"
|
||||
>
|
||||
<t-button
|
||||
name="search"
|
||||
slot="prefix-icon"
|
||||
size="small"
|
||||
theme="primary"
|
||||
bindtap="scanCode"
|
||||
icon="scan"
|
||||
/>
|
||||
<t-button
|
||||
slot="suffix-icon"
|
||||
bindtap="search"
|
||||
icon="search"
|
||||
theme="primary"
|
||||
size="small"
|
||||
/>
|
||||
</t-input>
|
||||
</block>
|
||||
</view>
|
||||
<t-button
|
||||
wx:if="{{!hideMore}}"
|
||||
bindtap="showSearch"
|
||||
theme="primary"
|
||||
size="small"
|
||||
>筛选
|
||||
</t-button>
|
||||
</view>
|
||||
|
||||
<popup-plugin visible="{{ show }}" bind:close="close" title="筛选条件">
|
||||
<slot name='content' />
|
||||
<slot wx:if="{{useFooterSlot}}" name="footer" />
|
||||
<view wx:else style="padding: 12px 0;display: flex;justify-content: center;position: sticky;bottom: 0;left: 0;background-color: #fff;z-index: 1;">
|
||||
<t-button
|
||||
bindtap="ok"
|
||||
style="min-width: 80px;"
|
||||
size="small"
|
||||
theme="primary"
|
||||
>搜索
|
||||
</t-button>
|
||||
</view>
|
||||
<slot name='content' />
|
||||
<slot wx:if="{{useFooterSlot}}" name="footer" />
|
||||
<view wx:else style="padding: 12px 0;display: flex;justify-content: center;position: sticky;bottom: 0;left: 0;background-color: #fff;z-index: 1;">
|
||||
<t-button
|
||||
bindtap="ok"
|
||||
style="min-width: 80px;"
|
||||
size="small"
|
||||
theme="primary"
|
||||
>搜索
|
||||
</t-button>
|
||||
</view>
|
||||
</popup-plugin>
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"usingComponents": {
|
||||
"popup-plugin": "/pages/components/popup-plugin/popup-plugin",
|
||||
"t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
|
||||
"t-radio": "tdesign-miniprogram/radio/radio",
|
||||
"t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
|
||||
"t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group"
|
||||
}
|
||||
|
||||
@@ -4,22 +4,10 @@ Component({
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
mode: {
|
||||
type: String,
|
||||
value: "single",
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
value: "请选择",
|
||||
},
|
||||
options: {
|
||||
type: Array,
|
||||
value: [],
|
||||
},
|
||||
value: {
|
||||
type: null,
|
||||
value: [],
|
||||
},
|
||||
mode: { type: String, value: "single" },
|
||||
title: { type: String, value: "请选择" },
|
||||
options: { type: Array, value: [] },
|
||||
value: { type: null, value: [] },
|
||||
},
|
||||
observers: {
|
||||
"value,mode": function (v, m) {
|
||||
@@ -50,7 +38,8 @@ Component({
|
||||
this.setData({ visible: false });
|
||||
},
|
||||
radioChange(e: any) {
|
||||
this.setData({ val: e.detail.value });
|
||||
this.triggerEvent("change", { value: e.detail.value });
|
||||
this.setData({ val: e.detail.value, visible: false });
|
||||
},
|
||||
checkboxChange(e: any) {
|
||||
this.setData({ val: e.detail.value });
|
||||
|
||||
@@ -5,16 +5,30 @@
|
||||
|
||||
<popup-plugin visible="{{visible}}" bind:close="close" title="{{title}}">
|
||||
|
||||
<view>
|
||||
<view style="padding: 12px 0;">
|
||||
<t-radio-group
|
||||
wx:if="{{mode == 'single'}}"
|
||||
bind:change="radioChange"
|
||||
allow-uncheck
|
||||
value="{{val}}"
|
||||
options="{{options}}"
|
||||
/>
|
||||
<t-checkbox-group wx:else value="{{val}}" bind:change="checkboxChange">
|
||||
borderless
|
||||
>
|
||||
<t-radio
|
||||
wx:for="{{options}}"
|
||||
wx:key="index"
|
||||
value="{{item.value}}"
|
||||
style="padding-bottom: 6px;padding-top: 6px;"
|
||||
>{{item.label}}
|
||||
</t-radio>
|
||||
</t-radio-group>
|
||||
<t-checkbox-group
|
||||
wx:else
|
||||
value="{{val}}"
|
||||
bind:change="checkboxChange"
|
||||
borderless
|
||||
>
|
||||
<t-checkbox
|
||||
style="padding-bottom: 6px;padding-top: 6px;"
|
||||
wx:for="{{options}}"
|
||||
icon="rectangle"
|
||||
wx:key="index"
|
||||
@@ -23,7 +37,7 @@
|
||||
</t-checkbox>
|
||||
</t-checkbox-group>
|
||||
</view>
|
||||
<view class="footer">
|
||||
<view class="footer" wx:if="{{ mode == 'multiple' }}">
|
||||
<t-button size="small" theme="primary" bindtap="ok">确定</t-button>
|
||||
</view>
|
||||
</popup-plugin>
|
||||
|
||||
@@ -6,7 +6,7 @@ Component({
|
||||
properties: {
|
||||
active: {
|
||||
type: String,
|
||||
value: "home",
|
||||
value: "",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -15,7 +15,7 @@ Component({
|
||||
*/
|
||||
data: {
|
||||
list: [
|
||||
{ value: "home", label: "首页", icon: "home" },
|
||||
{ value: "index", label: "首页", icon: "home" },
|
||||
{ value: "scan", label: "扫码", icon: "scan" },
|
||||
{ value: "my", label: "我的", icon: "user" },
|
||||
],
|
||||
@@ -31,12 +31,9 @@ Component({
|
||||
*/
|
||||
methods: {
|
||||
onChange(e: any) {
|
||||
if (e.detail.value == this.data.active) {
|
||||
return;
|
||||
if (e.detail.value != this.data.active) {
|
||||
wx.reLaunch({ url: this.data.pages[e.detail.value] });
|
||||
}
|
||||
wx.reLaunch({
|
||||
url: this.data.pages[e.detail.value],
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
<t-tab-bar
|
||||
t-class="t-tab-bar"
|
||||
value="{{active}}"
|
||||
bindchange="onChange"
|
||||
theme="normal"
|
||||
fixed="{{true}}"
|
||||
split="{{false}}"
|
||||
>
|
||||
<t-tab-bar t-class="t-tab-bar" value="{{active}}" bindchange="onChange" theme="normal" fixed="{{true}}" split="{{false}}">
|
||||
<t-tab-bar-item wx:for="{{list}}" wx:key="value" value="{{item.value}}" icon="{{item.icon}}">
|
||||
{{item.label}}
|
||||
</t-tab-bar-item>
|
||||
</t-tab-bar>
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"t-icon": "tdesign-miniprogram/icon/icon"
|
||||
"t-icon": "tdesign-miniprogram/icon/icon",
|
||||
"tab-bar-plugin": "/pages/components/tab-bar-plugin/tab-bar-plugin",
|
||||
"pagination-plugin": "/pages/components/pagination-plugin/pagination-plugin",
|
||||
"select-plugin": "/pages/components/select-plugin/select-plugin",
|
||||
"search-popup": "/pages/components/search-popup/search-popup"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// pages/index/index.ts
|
||||
|
||||
import { menuConfig } from "@/utils/menuConfig";
|
||||
import { Subscribe } from "@/utils/subscribe";
|
||||
import { getDataSet, toObject } from "@/utils/util";
|
||||
|
||||
// const app = getApp();
|
||||
// const Storage = app.Storage;
|
||||
@@ -8,15 +10,123 @@ Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {},
|
||||
data: {
|
||||
BGColors: [
|
||||
"linear-gradient( 135deg, #FDEB71 10%, #F8D800 100%)",
|
||||
"linear-gradient( 135deg, #ABDCFF 10%, #0396FF 100%)",
|
||||
"linear-gradient( 135deg, #FEB692 10%, #EA5455 100%)",
|
||||
"linear-gradient( 135deg, #CE9FFC 10%, #7367F0 100%)",
|
||||
"linear-gradient( 135deg, #90F7EC 10%, #32CCBC 100%)",
|
||||
"linear-gradient( 135deg, #FFF6B7 10%, #F6416C 100%)",
|
||||
"linear-gradient( 135deg, #81FBB8 10%, #28C76F 100%)",
|
||||
"linear-gradient( 135deg, #E2B0FF 10%, #9F44D3 100%)",
|
||||
"linear-gradient( 135deg, #F97794 10%, #623AA2 100%)",
|
||||
"linear-gradient( 135deg, #FCCF31 10%, #F55555 100%)",
|
||||
"linear-gradient( 135deg, #F761A1 10%, #8C1BAB 100%)",
|
||||
"linear-gradient( 135deg, #43CBFF 10%, #9708CC 100%)",
|
||||
"linear-gradient( 135deg, #5EFCE8 10%, #736EFE 100%)",
|
||||
"linear-gradient( 135deg, #FAD7A1 10%, #E96D71 100%)",
|
||||
"linear-gradient( 135deg, #FFD26F 10%, #3677FF 100%)",
|
||||
"linear-gradient( 135deg, #A0FE65 10%, #FA016D 100%)",
|
||||
"linear-gradient( 135deg, #FFDB01 10%, #0E197D 100%)",
|
||||
"linear-gradient( 135deg, #FEC163 10%, #DE4313 100%)",
|
||||
"linear-gradient( 135deg, #92FFC0 10%, #002661 100%)",
|
||||
"linear-gradient( 135deg, #EEAD92 10%, #6018DC 100%)",
|
||||
"linear-gradient( 135deg, #F6CEEC 10%, #D939CD 100%)",
|
||||
"linear-gradient( 135deg, #52E5E7 10%, #130CB7 100%)",
|
||||
"linear-gradient( 135deg, #F1CA74 10%, #A64DB6 100%)",
|
||||
"linear-gradient( 135deg, #E8D07A 10%, #5312D6 100%)",
|
||||
"linear-gradient( 135deg, #EECE13 10%, #B210FF 100%)",
|
||||
"linear-gradient( 135deg, #79F1A4 10%, #0E5CAD 100%)",
|
||||
],
|
||||
params: {
|
||||
curr_page: 1,
|
||||
page_count: 20,
|
||||
},
|
||||
total: 100,
|
||||
current1: ["checkbox1", "checkbox2"],
|
||||
current2: "checkbox1",
|
||||
options: [
|
||||
{ label: "多选", value: "checkbox1" },
|
||||
{ label: "多选", value: "checkbox2" },
|
||||
{
|
||||
label:
|
||||
"多选标题多行多选标题多行多选标题多行多选标题多行多选标题多行多选标题多行",
|
||||
value: "checkbox3",
|
||||
maxLabelRow: 2,
|
||||
},
|
||||
{
|
||||
label: "多选",
|
||||
value: "checkbox4",
|
||||
content:
|
||||
"描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息",
|
||||
maxContentRow: 2,
|
||||
},
|
||||
{ label: "多选", value: "checkbox11" },
|
||||
{ label: "多选", value: "checkbox21" },
|
||||
{
|
||||
label:
|
||||
"多选标题多行多选标题多行多选标题多行多选标题多行多选标题多行多选标题多行",
|
||||
value: "checkbox31",
|
||||
maxLabelRow: 2,
|
||||
},
|
||||
{
|
||||
label: "多选",
|
||||
value: "checkbox41",
|
||||
content:
|
||||
"描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息描述信息",
|
||||
maxContentRow: 2,
|
||||
},
|
||||
],
|
||||
authInfo: {} as any,
|
||||
menuList: [] as any,
|
||||
},
|
||||
|
||||
change() {
|
||||
Subscribe.set("isLogin", "zzzuz");
|
||||
Subscribe.set("isLogin", "hello");
|
||||
// wx.navigateTo({ url: "/pages/my/my" });
|
||||
},
|
||||
changePage(e: any) {
|
||||
this.data.params.curr_page = e.detail.curr_page;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
changeSelect(e: any) {
|
||||
console.log(e);
|
||||
},
|
||||
navToMy() {
|
||||
wx.navigateTo({ url: "/pages/my/my" });
|
||||
},
|
||||
init() {
|
||||
this.data.authInfo = {};
|
||||
const companyInfo = toObject(wx.getStorageSync("company_info"));
|
||||
this.data.menuList.length = 0;
|
||||
menuConfig.forEach((el) => {
|
||||
const children: any[] = [];
|
||||
el.children.forEach((ell) => {
|
||||
// todo 权限判断
|
||||
// if (!ell.auth || this.data.authInfo[ell.auth]) {
|
||||
children.push(ell);
|
||||
// }
|
||||
});
|
||||
if (children.length) {
|
||||
this.data.menuList.push({
|
||||
...el,
|
||||
children: children,
|
||||
});
|
||||
}
|
||||
});
|
||||
// this.getIndex();
|
||||
this.setData({
|
||||
authInfo: this.data.authInfo,
|
||||
menuList: this.data.menuList,
|
||||
hideTabKeys: companyInfo.staff_type == 3 ? ["2"] : [],
|
||||
});
|
||||
},
|
||||
nav(e: any) {
|
||||
const url = getDataSet(e).url;
|
||||
wx.navigateTo({ url });
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
@@ -30,7 +140,10 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
onShow() {
|
||||
wx.hideHomeButton();
|
||||
this.init();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
|
||||
@@ -1,6 +1,38 @@
|
||||
<page-plugin>
|
||||
<page-plugin loading="{{true}}" isLogin="{{true}}" isAuth="{{true}}">
|
||||
<text>pages/index/index.wxml</text>
|
||||
<t-button bind:tap="change">change</t-button>
|
||||
<t-button bind:tap="navToMy">my</t-button>
|
||||
<t-icon name="user-vip" style="color: #0052D9" size="20px"></t-icon>
|
||||
</page-plugin>
|
||||
<pagination-plugin
|
||||
curr_page="{{params.curr_page}}"
|
||||
total="{{total}}"
|
||||
page_count="{{params.page_count}}"
|
||||
bind:change="changePage"
|
||||
/>
|
||||
<block wx:for="{{ menuList }}" wx:key="index" wx:for-item="item">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<t-icon name="{{ item.icon }}" style="color: {{item.iconColor}};font-size: 1.2em;margin-right: 4px;" />
|
||||
<text style="font-weight: bold;font-size: 1.1em;">{{ item.title }}</text>
|
||||
</view>
|
||||
<view style="display: flex;align-items: center;flex-wrap: wrap;">
|
||||
<block wx:for="{{ item.children }}" wx:key="index" wx:for-item="child">
|
||||
<view class="menu-item" bindtap="nav" data-url="{{ child.url }}">
|
||||
<image class="nav-item-icon" src="/assets/icons/{{child.title}}.svg" mode="aspectFit" />
|
||||
<view>{{ child.title }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</page-plugin>
|
||||
<tab-bar-plugin active="index" />
|
||||
<select-plugin
|
||||
mode="single"
|
||||
value="{{current2}}"
|
||||
options="{{options}}"
|
||||
bind:change="changeSelect"
|
||||
>
|
||||
<view style="display: block;">下拉选择</view>
|
||||
</select-plugin>
|
||||
<search-popup>
|
||||
<view slot="content">1111</view>
|
||||
</search-popup>
|
||||
|
||||
|
||||
@@ -1 +1,25 @@
|
||||
/* pages/index/index.wxss */
|
||||
.container {
|
||||
height: calc(100vh - var(--td-tab-bar-height, 80rpx) - env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
width: clamp(80px, 25%, 120px);
|
||||
box-sizing: border-box;
|
||||
padding: 8px;
|
||||
--width: calc((100vw - 16px - 24px) / 4 * 0.4);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.menu-item:active {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.nav-item-icon {
|
||||
width: var(--width);
|
||||
height: var(--width);
|
||||
display: inline-flex;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"t-button": "tdesign-miniprogram/button/button"
|
||||
"t-button": "tdesign-miniprogram/button/button",
|
||||
"search-popup": "/pages/components/search-popup/search-popup",
|
||||
"card-plugin": "/pages/components/card-plugin/card-plugin",
|
||||
"t-input": "tdesign-miniprogram/input/input",
|
||||
"tab-bar-plugin": "/pages/components/tab-bar-plugin/tab-bar-plugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,37 @@ import { Subscribe } from "@/utils/subscribe";
|
||||
import { setStorage } from "@/utils/util";
|
||||
|
||||
Page({
|
||||
data: {},
|
||||
data: {
|
||||
columns: [
|
||||
{ title: "我的收藏", width: "100px", dataIndex: "name" },
|
||||
{ title: "我的点赞", width: "200px", dataIndex: "count" },
|
||||
{ title: "我的评论", width: "300px", dataIndex: "desc" },
|
||||
],
|
||||
data: [
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
// { name: "张三", count: 1, desc: "11111" },
|
||||
],
|
||||
},
|
||||
change() {
|
||||
setStorage("isLogin", 1);
|
||||
Subscribe.set("isLogin", "zzzuz");
|
||||
// wx.navigateTo({ url: "/pages/my/my" });
|
||||
},
|
||||
searchChange(e: any) {
|
||||
console.log(e);
|
||||
},
|
||||
ok() {
|
||||
console.log("ok");
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
@@ -21,7 +46,9 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
onShow() {
|
||||
wx.hideHomeButton();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
|
||||
@@ -2,4 +2,19 @@
|
||||
|
||||
<text>pages/my/my.wxml</text>
|
||||
<t-button bind:tap="change">change</t-button>
|
||||
</page-plugin>
|
||||
<view style="padding: 12px;">
|
||||
|
||||
<search-popup bind:ok="ok" bind:change="searchChange">
|
||||
<view slot="content">11111</view>
|
||||
</search-popup>
|
||||
<card-plugin>
|
||||
<view slot="header">11111</view>
|
||||
<view slot="content">
|
||||
<view style="height: 70px">11111</view>
|
||||
</view>
|
||||
</card-plugin>
|
||||
</view>
|
||||
|
||||
</page-plugin>
|
||||
<tab-bar-plugin active="my" />
|
||||
|
||||
|
||||
@@ -1 +1,3 @@
|
||||
/* pages/my/my.wxss */
|
||||
.container {
|
||||
height: calc(100vh - var(--td-tab-bar-height, 80rpx) - env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "流程管理"
|
||||
}
|
||||
|
||||
211
miniprogram/pages/produce/processManage/processManage.ts
Normal file
211
miniprogram/pages/produce/processManage/processManage.ts
Normal file
@@ -0,0 +1,211 @@
|
||||
import { getDataSet } from "@/utils/util";
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
process: [
|
||||
{
|
||||
p_process_name: "办公流程",
|
||||
parent_process_id: 34,
|
||||
child: [
|
||||
{
|
||||
process_name: "录单亲亲我",
|
||||
process_id: 86,
|
||||
parent_process_id: 34,
|
||||
p_process_name: "办公流程",
|
||||
num: 1,
|
||||
tot_num: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
p_process_name: "车间流程",
|
||||
parent_process_id: 36,
|
||||
child: [
|
||||
{
|
||||
process_name: "接单",
|
||||
process_id: 85,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 12,
|
||||
tot_num: 12,
|
||||
},
|
||||
{
|
||||
process_name: "测量",
|
||||
process_id: 91,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 11,
|
||||
tot_num: 12,
|
||||
},
|
||||
{
|
||||
process_name: "报价",
|
||||
process_id: 92,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "复尺",
|
||||
process_id: 93,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "备料",
|
||||
process_id: 94,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "拆单",
|
||||
process_id: 95,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "跟单",
|
||||
process_id: 96,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "排单",
|
||||
process_id: 97,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "开料",
|
||||
process_id: 98,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "封边",
|
||||
process_id: 99,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "打孔",
|
||||
process_id: 100,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "特殊加工",
|
||||
process_id: 101,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "分拣",
|
||||
process_id: 102,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 5,
|
||||
tot_num: 6,
|
||||
},
|
||||
{
|
||||
process_name: "包装",
|
||||
process_id: 103,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 6,
|
||||
tot_num: 7,
|
||||
},
|
||||
{
|
||||
process_name: "入库",
|
||||
process_id: 104,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
{
|
||||
process_name: "出库",
|
||||
process_id: 105,
|
||||
parent_process_id: 36,
|
||||
p_process_name: "车间流程",
|
||||
num: 7,
|
||||
tot_num: 8,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
navDetail(e: any) {
|
||||
const index = getDataSet(e).index.split(",");
|
||||
const pProcess = this.data.process[index[0]];
|
||||
const cProcess = pProcess.child[index[1]];
|
||||
const { p_process_name, process_name, process_id } = cProcess;
|
||||
const title = encodeURIComponent(`${p_process_name} - ${process_name}`);
|
||||
console.log(title);
|
||||
wx.navigateTo({
|
||||
url: `/pages/produce/processManageDetail/processManageDetail?process_id=${process_id}&title=${title}`,
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {},
|
||||
});
|
||||
|
||||
18
miniprogram/pages/produce/processManage/processManage.wxml
Normal file
18
miniprogram/pages/produce/processManage/processManage.wxml
Normal file
@@ -0,0 +1,18 @@
|
||||
<block wx:for="{{ process }}" wx:key="parent_process_id">
|
||||
<view class="process-box">
|
||||
<view class="p_process_name">{{ item.p_process_name }}</view>
|
||||
<view class="process-child-box">
|
||||
<block
|
||||
wx:for="{{ item.child }}"
|
||||
wx:key="process_id"
|
||||
wx:for-item="child"
|
||||
wx:for-index="ci"
|
||||
>
|
||||
<view class="process-child-item-box" bind:tap="navDetail" data-index="{{ index+','+ci }}">{{ child.process_name }}
|
||||
<view class="process-child-item-num">{{ child.num }}</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
35
miniprogram/pages/produce/processManage/processManage.wxss
Normal file
35
miniprogram/pages/produce/processManage/processManage.wxss
Normal file
@@ -0,0 +1,35 @@
|
||||
.process-child-box {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
column-gap: 32rpx;
|
||||
row-gap: 32rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.p_process_name {
|
||||
font-size: 1.125em;
|
||||
font-weight: bold;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.process-child-item-box {
|
||||
position: relative;
|
||||
border: 1rpx solid #ddd;
|
||||
padding: 16rpx;
|
||||
border-radius: 8rpx;
|
||||
|
||||
}
|
||||
|
||||
.process-child-item-num {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform: translate(50%, -50%);
|
||||
background-color: #2ba471;
|
||||
color: #fff;
|
||||
border-radius: 100%;
|
||||
line-height: 1.1;
|
||||
padding: 2rpx 8rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"search-popup": "/pages/components/search-popup/search-popup",
|
||||
"card-plugin": "/pages/components/card-plugin/card-plugin",
|
||||
"card-item-plugin": "/pages/components/card-item-plugin/card-item-plugin"
|
||||
},
|
||||
"navigationBarTitleText": "流程管理详情"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
import { getDataSet } from "@/utils/util";
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
params: { curr_page: 1, page_count: 20, state: "1", process_id: "" },
|
||||
list: [
|
||||
{
|
||||
order_no: "XSDD2025112500000043",
|
||||
custom_name: "客户5",
|
||||
custom_address: "",
|
||||
custom_phone: null,
|
||||
custom_order_no: "",
|
||||
goods_name: "浴室柜",
|
||||
info_process_id: 163,
|
||||
produce_info_id: 62,
|
||||
process_code: "ld",
|
||||
state: 1,
|
||||
end_user_address: null,
|
||||
end_user_name: null,
|
||||
end_user_phone: null,
|
||||
},
|
||||
],
|
||||
count: 1,
|
||||
},
|
||||
tabChange(e: any) {
|
||||
const state = getDataSet(e).key;
|
||||
this.data.params.state = state;
|
||||
this.page();
|
||||
},
|
||||
page(curr: number = 1) {
|
||||
this.data.params.curr_page = curr;
|
||||
this.setData({ params: this.data.params });
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
// console.log(options);
|
||||
wx.setNavigationBarTitle({
|
||||
title: decodeURIComponent(options.title || ""),
|
||||
});
|
||||
this.data.params.process_id = `${options.process_id || ""}`;
|
||||
this.page();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<search-popup placeholder="输入销售单号" />
|
||||
<view class="tabs">
|
||||
<view class="tabs-item {{ params.state == '1' ? 'active': '' }}" bind:tap="tabChange" data-key="1">待处理</view>
|
||||
<view class="tabs-item {{ params.state == '2' ? 'active': '' }}" bind:tap="tabChange" data-key="2">已处理</view>
|
||||
</view>
|
||||
<block wx:for="{{ list }}" wx:key="info_process_id">
|
||||
<card-plugin>
|
||||
<view slot="header">{{ item.order_no }}</view>
|
||||
<view slot="content">
|
||||
<card-item-plugin label="订单编号" value="1哒哒哒哒哒哒多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多多" />
|
||||
<card-item-plugin label="订单编号" value="111111" />
|
||||
<card-item-plugin label="订单编号" value="111111" />
|
||||
<card-item-plugin label="订单编号" value="111111" />
|
||||
</view>
|
||||
</card-plugin>
|
||||
</block>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
.tabs {
|
||||
display: inline-flex;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.tabs-item {
|
||||
display: inline-flex;
|
||||
height: 64rpx;
|
||||
align-items: center;
|
||||
padding: 0 24rpx;
|
||||
background-color: #f5f5f5;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.tabs-item.active {
|
||||
background-color: #0052d9;
|
||||
color: #fff;
|
||||
}
|
||||
Reference in New Issue
Block a user