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,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