Commit a23013f7 by liangjianmin

style(scanTally): 优化样式和布局,调整入库界面样式结构

- 调整 fix-box 内部结构,新增任务数量显示条
- 优化任务标签样式,区分不同任务状态颜色
- 更新 tally-operate-section 上侧内边距,增加顶部空间
- 统一调整表单输入框和图片列表样式细节
- 优化弹出层内容宽度、边距和圆角设计
- 调整按钮区域固定定位和视觉样式
- 优化列表项选中状态和滚动区域样式
- 移除旧版重复样式规则,提升代码整洁度
parent 087ad70d
......@@ -7,6 +7,50 @@
z-index: 99;
padding: 20rpx 24rpx;
background: #f1f4f6;
.task-num-bar {
display: flex;
align-items: center;
justify-content: flex-end;
margin-top: 16rpx;
padding: 14rpx 20rpx;
background: #fff;
border-radius: 10rpx;
.task-inhouse {
font-size: 26rpx;
font-weight: 600;
color: #1969f9;
}
.task-tag {
display: flex;
align-items: center;
margin-left: 16rpx;
padding: 4rpx 14rpx;
border-radius: 6rpx;
background: #f0f5ff;
.task-tag-label {
font-size: 20rpx;
color: #666;
}
.task-tag-value {
font-size: 24rpx;
font-weight: 600;
color: #1969f9;
}
}
.task-tag-wait {
background: #fff7e6;
.task-tag-value {
color: #f98119;
}
}
}
}
}
......@@ -210,9 +254,8 @@
}
}
// 理货操作区域(与 tallyReceive/operate 样式一致)
.tally-operate-section {
padding: 100rpx 15rpx 0 15rpx;
padding: 180rpx 15rpx 0 15rpx;
.section {
margin-top: 15rpx;
......@@ -711,4 +754,4 @@
}
}
}
}
}
\ No newline at end of file
......@@ -2,6 +2,17 @@
<view class="scanTally">
<view class="fix-box">
<SearchBoxWithPicker :showPicker="false" placeholder="请扫描Digikey或Rochest二维码" :focus="is_focus" :value="keyword" :showClear="!!keyword" @input="handleSearchInput" @clear="clearInput" />
<view class="task-num-bar" v-if="order_sn && (taskAllNum > 0 || taskWaitTallyNum > 0)">
<text class="task-inhouse">{{ order_sn }}</text>
<view class="task-tag">
<text class="task-tag-label">总任务:</text>
<text class="task-tag-value">{{ taskAllNum }}</text>
</view>
<view class="task-tag task-tag-wait">
<text class="task-tag-label">待理货:</text>
<text class="task-tag-value">{{ taskWaitTallyNum }}</text>
</view>
</view>
</view>
<!-- 到货登记(自营)第一次入库 -->
<uni-drawer ref="showRightZyGoodsDat" mode="right">
......@@ -164,42 +175,6 @@
<!-- 理货操作区域(非拆货时在当前页面展示,参考 tallyReceive/operate) -->
<view class="tally-operate-section" v-if="tallyStep === 1">
<view class="section" v-if="tallyDetail">
<view class="field-item row">
<view class="is-watch row rowCenter verCenter" v-if="tallyDetail.is_watch == 1">看货</view>
<view class="item row verCenter">
<text class="label">入库单号:</text>
<text class="text">{{ tallyDetail.stock_in_sn }}</text>
</view>
<view class="item row verCenter">
<text class="label">入 仓 号:</text>
<text class="text">{{ tallyDetail.inhouse }}</text>
</view>
<template v-if="tallyDetail.box_sn">
<view class="item row verCenter">
<text class="label">物流单号:</text>
<text class="text">{{ tallyDetail.tracking_no }}</text>
</view>
<view class="item row verCenter">
<text class="label">箱号:</text>
<text class="text">{{ tallyDetail.box_sn }}</text>
</view>
</template>
<template v-else>
<view class="item row verCenter" style="flex: 0 0 100%;">
<text class="label">物流单号:</text>
<text class="text">{{ tallyDetail.tracking_no }}</text>
</view>
</template>
<view class="item row verCenter">
<text class="label">到货时间:</text>
<text class="tt">{{ tallyDetail.arrival_time_cn }}</text>
</view>
<view class="item row verCenter" style="margin-bottom: 17rpx;">
<text class="label">到货操作人:</text>
<text class="tt">{{ tallyDetail.arrival_name }}</text>
</view>
</view>
<view class="bor"></view>
<view class="item-tit row verCenter">
<template v-if="tallyDetail.sku_id > 0">
<text v-for="(v, idx) in tallyTabItems" :key="idx" :class="{ curr: tallyCurr == idx }" @click="tallyCurr = idx">{{ v }}</text>
......@@ -528,6 +503,8 @@
tallyList: [],
tallySelectedIndex: -1,
tallyStep: 0, // 0=扫码阶段 1=理货操作阶段
taskAllNum: 0,
taskWaitTallyNum: 0,
// 自营到货登记相关
indicatorDots: true,
autoplay: false,
......@@ -681,6 +658,7 @@
this.stock_in_id = item.stock_in_id;
this.stock_in_item_id = item.stock_in_item_id;
this.pendingStockInId = item.stock_in_id;
this.getStockInTaskNum();
this.enterTallyMode(item);
return;
}
......@@ -732,6 +710,7 @@
this.stock_in_item_id = selectedItem.stock_in_item_id;
this.pendingStockInId = selectedItem.stock_in_id;
this.$refs.popupTally.close();
this.getStockInTaskNum();
// 入库单状态"新创建"(1)需要先到货登记,再进入理货
if (selectedItem.stock_in_status === 1) {
......@@ -1146,9 +1125,10 @@
this.request(API.createTallyReceive, 'POST', params, true).then(res => {
if (res.code === 0) {
this.getStockInTaskNum();
if (wait_tally_qty == this.tallyFormParams.tally_qty) {
uni.showToast({ title: '全部理货成功', icon: 'success' });
setTimeout(() => { this.clearInput(); }, 2000);
setTimeout(() => { this.finishTally(); }, 2000);
} else {
uni.showModal({
title: '提示',
......@@ -1192,6 +1172,34 @@
this.tallyPicFlag = false;
},
/**
* 理货完成后回到扫码阶段,保留入仓号和任务统计
*/
finishTally() {
this.stock_in_id = '';
this.stock_in_item_id = '';
this.parsed_origin = '';
this.parsed_qty = '';
this.tallyStep = 0;
this.tallyDetail = null;
this.tallyCurr = 0;
this.resetTallyForm();
this.is_focus = false;
setTimeout(() => { this.is_focus = true; }, 200);
},
/**
* 获取入仓号的任务统计(总任务数 + 待理货数)
*/
getStockInTaskNum() {
if (!this.order_sn) return;
this.request(API.stockInTaskNum, 'GET', { inhouse: this.order_sn }, false).then(res => {
if (res.code === 0) {
this.taskAllNum = res.data.all_num || 0;
this.taskWaitTallyNum = res.data.wait_tally_num || 0;
}
});
},
/**
* 清空所有输入和状态,回到扫码初始状态并重新聚焦
*/
clearInput() {
......@@ -1205,6 +1213,8 @@
this.tallyStep = 0;
this.tallyDetail = null;
this.tallyCurr = 0;
this.taskAllNum = 0;
this.taskWaitTallyNum = 0;
this.resetTallyForm();
this.is_focus = false;
......
......@@ -469,7 +469,8 @@ const API = {
/**
* 扫码解析二维码
* */
scanQrCode: API_BASE_ICHUNT + '/supplywechatwms/scanQrCode'
scanQrCode: API_BASE_ICHUNT + '/supplywechatwms/scanQrCode',
stockInTaskNum: API_BASE + '/api/stockIn/stockIn/stockInTaskNum'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment