准备上传
This commit is contained in:
@@ -41,6 +41,21 @@ const _sfc_main = {
|
||||
})();
|
||||
if (!hasToken)
|
||||
return;
|
||||
try {
|
||||
const configStr = common_vendor.index.getStorageSync("PRODUCT_SEARCH_CONFIG");
|
||||
if (configStr) {
|
||||
const config = JSON.parse(configStr);
|
||||
if (config.openTab) {
|
||||
this.tab = config.openTab;
|
||||
}
|
||||
if (config.mode) {
|
||||
this.query.mode = config.mode;
|
||||
}
|
||||
common_vendor.index.removeStorageSync("PRODUCT_SEARCH_CONFIG");
|
||||
}
|
||||
} catch (e) {
|
||||
common_vendor.index.__f__("error", "at pages/product/list.vue:121", "[list] 处理查询配置失败:", e);
|
||||
}
|
||||
this.reload();
|
||||
},
|
||||
computed: {
|
||||
@@ -175,6 +190,9 @@ const _sfc_main = {
|
||||
} catch (e) {
|
||||
common_vendor.index.showToast({ title: "删除失败", icon: "none" });
|
||||
}
|
||||
},
|
||||
goSubmit() {
|
||||
common_vendor.index.navigateTo({ url: "/pages/product/submit" });
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -281,7 +299,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
});
|
||||
})
|
||||
} : {}, {
|
||||
A: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args))
|
||||
A: common_vendor.o((...args) => $options.loadMore && $options.loadMore(...args)),
|
||||
B: common_vendor.o((...args) => $options.goSubmit && $options.goSubmit(...args))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="page"><view class="tabs"><view class="{{['tab', a && 'active']}}" bindtap="{{b}}">全部</view><view class="{{['tab', c && 'active']}}" bindtap="{{d}}">查询</view><view class="tab extra" bindtap="{{e}}">我的提交</view></view><view wx:if="{{f}}" class="{{['search', x && 'template-mode']}}"><view class="mode"><picker mode="selector" range="{{h}}" bindchange="{{i}}"><view class="picker">{{g}}</view></picker></view><block wx:if="{{j}}"><input placeholder="输入名称/条码/规格查询" bindconfirm="{{k}}" value="{{l}}" bindinput="{{m}}"/></block><block wx:if="{{n}}"><view class="picker-row"><picker mode="selector" range="{{p}}" bindchange="{{q}}"><view class="picker">{{o}}</view></picker><picker mode="selector" range="{{s}}" bindchange="{{t}}"><view class="picker">{{r}}</view></picker></view><view class="params-wrap"><view wx:for="{{v}}" wx:for-item="p" wx:key="w" class="param-row"><input wx:if="{{p.a}}" placeholder="{{p.b}}" value="{{p.c}}" bindinput="{{p.d}}"/><input wx:elif="{{p.e}}" type="number" placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/><switch wx:elif="{{p.i}}" checked="{{p.j}}" bindchange="{{p.k}}"/><picker wx:elif="{{p.l}}" mode="selector" range="{{p.n}}" bindchange="{{p.o}}"><view class="picker">{{p.m}}</view></picker><picker wx:elif="{{p.p}}" mode="date" bindchange="{{p.r}}"><view class="picker">{{p.q}}</view></picker><input wx:else placeholder="{{p.s}}" value="{{p.t}}" bindinput="{{p.v}}"/></view></view></block><button size="mini" bindtap="{{w}}">查询</button></view><scroll-view scroll-y class="list" bindscrolltolower="{{A}}"><block wx:if="{{y}}"><view wx:for="{{z}}" wx:for-item="it" wx:key="l" class="item" bindtap="{{it.m}}"><image wx:if="{{it.a}}" src="{{it.b}}" class="thumb" mode="aspectFill"/><view class="content"><view class="name"><text>{{it.c}}</text><text wx:if="{{it.d}}" class="tag-deleted">已删除</text><text wx:if="{{it.e}}" class="tag-platform">平台推荐</text><text wx:elif="{{it.f}}" class="tag-custom">我的提交</text></view><view class="meta">{{it.g}} {{it.h}} {{it.i}}</view><view wx:if="{{it.j}}" class="card-params"><view wx:for="{{it.k}}" wx:for-item="v" wx:key="c" class="param">{{v.a}}:{{v.b}}</view></view></view></view></block><view wx:else class="empty"><text>暂无数据,点击右上角“+”新增</text></view></scroll-view></view>
|
||||
<view class="page"><view class="tabs"><view class="{{['tab', a && 'active']}}" bindtap="{{b}}">全部</view><view class="{{['tab', c && 'active']}}" bindtap="{{d}}">查询</view><view class="tab extra" bindtap="{{e}}">我的提交</view></view><view wx:if="{{f}}" class="{{['search', x && 'template-mode']}}"><view class="mode"><picker mode="selector" range="{{h}}" bindchange="{{i}}"><view class="picker">{{g}}</view></picker></view><block wx:if="{{j}}"><input placeholder="输入名称/条码/规格查询" bindconfirm="{{k}}" value="{{l}}" bindinput="{{m}}"/></block><block wx:if="{{n}}"><view class="picker-row"><picker mode="selector" range="{{p}}" bindchange="{{q}}"><view class="picker">{{o}}</view></picker><picker mode="selector" range="{{s}}" bindchange="{{t}}"><view class="picker">{{r}}</view></picker></view><view class="params-wrap"><view wx:for="{{v}}" wx:for-item="p" wx:key="w" class="param-row"><input wx:if="{{p.a}}" placeholder="{{p.b}}" value="{{p.c}}" bindinput="{{p.d}}"/><input wx:elif="{{p.e}}" type="number" placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/><switch wx:elif="{{p.i}}" checked="{{p.j}}" bindchange="{{p.k}}"/><picker wx:elif="{{p.l}}" mode="selector" range="{{p.n}}" bindchange="{{p.o}}"><view class="picker">{{p.m}}</view></picker><picker wx:elif="{{p.p}}" mode="date" bindchange="{{p.r}}"><view class="picker">{{p.q}}</view></picker><input wx:else placeholder="{{p.s}}" value="{{p.t}}" bindinput="{{p.v}}"/></view></view></block><button size="mini" bindtap="{{w}}">查询</button></view><scroll-view scroll-y class="list" bindscrolltolower="{{A}}"><block wx:if="{{y}}"><view wx:for="{{z}}" wx:for-item="it" wx:key="l" class="item" bindtap="{{it.m}}"><image wx:if="{{it.a}}" src="{{it.b}}" class="thumb" mode="aspectFill"/><view class="content"><view class="name"><text>{{it.c}}</text><text wx:if="{{it.d}}" class="tag-deleted">已删除</text><text wx:if="{{it.e}}" class="tag-platform">平台推荐</text><text wx:elif="{{it.f}}" class="tag-custom">我的提交</text></view><view class="meta">{{it.g}} {{it.h}} {{it.i}}</view><view wx:if="{{it.j}}" class="card-params"><view wx:for="{{it.k}}" wx:for-item="v" wx:key="c" class="param">{{v.a}}:{{v.b}}</view></view></view></view></block><view wx:else class="empty"><text>暂无数据,点击右上角“+”新增</text></view></scroll-view><view class="fab" bindtap="{{B}}">+</view></view>
|
||||
@@ -166,11 +166,12 @@
|
||||
bottom: 120rpx;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: #4C8DFF;
|
||||
background: linear-gradient(135deg, #4c8dff, #6ab7ff);
|
||||
color: #fff;
|
||||
border-radius: 50rpx;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 48rpx;
|
||||
box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 20rpx 40rpx rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
@@ -26,19 +26,27 @@
|
||||
/* 文章场景相关 */
|
||||
/* 表单控件尺寸(统一配置,避免页面内硬编码) */
|
||||
.page {
|
||||
padding: 24rpx 24rpx 160rpx;
|
||||
min-height: 100vh;
|
||||
padding: 20rpx 24rpx 160rpx;
|
||||
background: #f6f7fb;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
gap: 16rpx;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.model {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: #2d3a4a;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
.status.deleted {
|
||||
font-size: 24rpx;
|
||||
@@ -46,17 +54,20 @@
|
||||
border-radius: 999rpx;
|
||||
background: #c0c4cc;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx 22rpx;
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 16rpx;
|
||||
padding: 12rpx 0;
|
||||
border-bottom: 1rpx solid #f1f2f5;
|
||||
}
|
||||
@@ -64,16 +75,19 @@
|
||||
border-bottom: none;
|
||||
}
|
||||
.label {
|
||||
width: 160rpx;
|
||||
flex-shrink: 0;
|
||||
width: 140rpx;
|
||||
font-size: 26rpx;
|
||||
color: #7a8899;
|
||||
}
|
||||
.value {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
color: #2d3a4a;
|
||||
word-break: break-all;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.block-title {
|
||||
font-size: 28rpx;
|
||||
@@ -84,6 +98,7 @@
|
||||
.placeholder {
|
||||
font-size: 26rpx;
|
||||
color: #7a8899;
|
||||
word-break: break-word;
|
||||
}
|
||||
.params {
|
||||
display: flex;
|
||||
@@ -93,16 +108,22 @@
|
||||
.param {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
align-items: flex-start;
|
||||
gap: 16rpx;
|
||||
font-size: 26rpx;
|
||||
color: #2d3a4a;
|
||||
}
|
||||
.param-key {
|
||||
flex-shrink: 0;
|
||||
color: #7a8899;
|
||||
min-width: 160rpx;
|
||||
}
|
||||
.param-val {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
text-align: left;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.images {
|
||||
display: grid;
|
||||
@@ -116,9 +137,17 @@
|
||||
background: #f0f2f5;
|
||||
}
|
||||
.footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 20rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
background: rgba(255, 255, 255, 0.96);
|
||||
box-shadow: 0 -6rpx 20rpx rgba(0, 0, 0, 0.08);
|
||||
}
|
||||
.loading {
|
||||
height: 100vh;
|
||||
|
||||
@@ -1 +1 @@
|
||||
<scroll-view scroll-y class="page"><view class="hero"><text class="title">提交配件</text><text class="desc">填写型号、名称、参数与图片,提交后进入待审核状态</text></view><view class="section"><view class="row required"><text class="label">型号</text><input placeholder="请输入型号(必填)" value="{{a}}" bindinput="{{b}}"/></view><view class="row"><text class="label">品牌</text><input placeholder="品牌/厂商" value="{{c}}" bindinput="{{d}}"/></view><view class="row"><text class="label">条码</text><input placeholder="可选,建议扫码录入" value="{{e}}" bindinput="{{f}}"/><button size="mini" class="picker-btn" bindtap="{{g}}">识码</button></view></view><view class="section"><view class="row"><text class="label">类别</text><picker mode="selector" range="{{i}}" bindchange="{{j}}"><view class="picker">{{h}}</view></picker></view></view><view class="section"><view class="row"><text class="label">编号</text><input placeholder="内部/外部编号(可选)" value="{{k}}" bindinput="{{l}}"/></view></view><view class="section"><view class="row"><text class="label">模板</text></view><view class="row"><picker mode="selector" range="{{n}}" bindchange="{{o}}"><view class="picker">{{m}}</view></picker></view></view><view wx:if="{{p}}" class="section"><view class="row"><text class="label">参数</text></view><view class="param-list"><view wx:for="{{q}}" wx:for-item="p" wx:key="A" class="row"><text class="label">{{p.a}}<text wx:if="{{p.b}}">({{p.c}})</text><text wx:if="{{p.d}}" style="color:#ff5b5b">*</text></text><block wx:if="{{p.e}}"><input placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/></block><block wx:elif="{{p.i}}"><input type="number" placeholder="{{p.j}}" value="{{p.k}}" bindinput="{{p.l}}"/></block><block wx:elif="{{p.m}}"><switch checked="{{p.n}}" bindchange="{{p.o}}"/></block><block wx:elif="{{p.p}}"><picker mode="selector" range="{{p.r}}" bindchange="{{p.s}}"><view class="picker">{{p.q}}</view></picker></block><block wx:elif="{{p.t}}"><picker mode="date" bindchange="{{p.w}}"><view class="picker">{{p.v}}</view></picker></block><block wx:else><input placeholder="{{p.x}}" value="{{p.y}}" bindinput="{{p.z}}"/></block></view></view></view><view class="section"><view class="row"><text class="label">图片</text></view><image-uploader wx:if="{{s}}" u-i="7f3a3bde-0" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"/></view><view class="section"><view class="row"><text class="label">备注</text></view><block wx:if="{{r0}}"><textarea class="textarea" placeholder="选填:补充说明" value="{{t}}" bindinput="{{v}}"/></block></view><view class="section"><view class="row"><text class="label">安全库存</text></view><view class="row triple"><input type="number" placeholder="下限" value="{{w}}" bindinput="{{x}}"/><input type="number" placeholder="上限" value="{{y}}" bindinput="{{z}}"/></view></view><view class="fixed"><button class="primary" loading="{{A}}" bindtap="{{B}}">提交审核</button><button class="primary" style="margin-top:16rpx;background:#7aa9ff" loading="{{C}}" bindtap="{{D}}">查重</button></view></scroll-view>
|
||||
<scroll-view scroll-y class="page"><view class="section"><view class="row required"><text class="label">型号</text><input placeholder="请输入型号(必填)" value="{{a}}" bindinput="{{b}}"/></view><view class="row"><text class="label">品牌</text><input placeholder="品牌/厂商" value="{{c}}" bindinput="{{d}}"/></view><view class="row"><text class="label">条码</text><input placeholder="可选,建议扫码录入" value="{{e}}" bindinput="{{f}}"/><button size="mini" class="picker-btn" bindtap="{{g}}">识码</button></view></view><view class="section"><view class="row"><text class="label">类别</text><picker mode="selector" range="{{i}}" bindchange="{{j}}"><view class="picker">{{h}}</view></picker></view></view><view class="section"><view class="row"><text class="label">编号</text><input placeholder="内部/外部编号(可选)" value="{{k}}" bindinput="{{l}}"/></view></view><view class="section"><view class="row"><text class="label">模板</text></view><view class="row"><picker mode="selector" range="{{n}}" bindchange="{{o}}"><view class="picker">{{m}}</view></picker></view></view><view wx:if="{{p}}" class="section"><view class="row"><text class="label">参数</text></view><view class="param-list"><view wx:for="{{q}}" wx:for-item="p" wx:key="A" class="row"><text class="label">{{p.a}}<text wx:if="{{p.b}}">({{p.c}})</text><text wx:if="{{p.d}}" style="color:#ff5b5b">*</text></text><block wx:if="{{p.e}}"><input placeholder="{{p.f}}" value="{{p.g}}" bindinput="{{p.h}}"/></block><block wx:elif="{{p.i}}"><input type="number" placeholder="{{p.j}}" value="{{p.k}}" bindinput="{{p.l}}"/></block><block wx:elif="{{p.m}}"><switch checked="{{p.n}}" bindchange="{{p.o}}"/></block><block wx:elif="{{p.p}}"><picker mode="selector" range="{{p.r}}" bindchange="{{p.s}}"><view class="picker">{{p.q}}</view></picker></block><block wx:elif="{{p.t}}"><picker mode="date" bindchange="{{p.w}}"><view class="picker">{{p.v}}</view></picker></block><block wx:else><input placeholder="{{p.x}}" value="{{p.y}}" bindinput="{{p.z}}"/></block></view></view></view><view class="section"><view class="row"><text class="label">图片</text></view><image-uploader wx:if="{{s}}" u-i="7f3a3bde-0" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"/></view><view class="section"><view class="row"><text class="label">备注</text></view><block wx:if="{{r0}}"><textarea class="textarea" placeholder="选填:补充说明" value="{{t}}" bindinput="{{v}}"/></block></view><view class="section"><view class="row"><text class="label">安全库存</text></view><view class="row triple"><input type="number" placeholder="下限" value="{{w}}" bindinput="{{x}}"/><input type="number" placeholder="上限" value="{{y}}" bindinput="{{z}}"/></view></view><view class="fixed"><button class="primary" loading="{{A}}" bindtap="{{B}}">提交审核</button><button class="primary" style="margin-top:16rpx;background:#7aa9ff" loading="{{C}}" bindtap="{{D}}">查重</button></view></scroll-view>
|
||||
@@ -26,30 +26,16 @@
|
||||
/* 文章场景相关 */
|
||||
/* 表单控件尺寸(统一配置,避免页面内硬编码) */
|
||||
.page {
|
||||
padding: 24rpx 24rpx 120rpx;
|
||||
height: 100vh;
|
||||
padding: 16rpx 24rpx 120rpx;
|
||||
background: #f6f7fb;
|
||||
}
|
||||
.hero {
|
||||
padding: 24rpx;
|
||||
background: linear-gradient(135deg, #4c8dff, #6ab7ff);
|
||||
border-radius: 20rpx;
|
||||
color: #fff;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.desc {
|
||||
font-size: 26rpx;
|
||||
margin-top: 8rpx;
|
||||
opacity: 0.9;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.section {
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
padding: 20rpx 22rpx;
|
||||
margin-bottom: 24rpx;
|
||||
margin-bottom: 16rpx;
|
||||
box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.row {
|
||||
|
||||
Reference in New Issue
Block a user