This commit is contained in:
bb_pan 2025-09-06 11:37:45 +08:00
parent 05fc8db3f8
commit 3dbf5081d7
9 changed files with 48 additions and 82 deletions

View File

@ -626,8 +626,8 @@ export default {
} }
</script> </script>
<style> <style scoped>
.custom-toast { ::v-deep .custom-toast {
position: fixed; position: fixed;
left: 0; left: 0;
right: 0; right: 0;
@ -639,57 +639,18 @@ export default {
opacity: 0; opacity: 0;
transition: opacity 0.3s; transition: opacity 0.3s;
} }
.custom-toast.top { ::v-deep .custom-toast.top {
top: 0; top: 0;
} }
.custom-toast.bottom { ::v-deep .custom-toast.bottom {
bottom: 0; bottom: 0;
} }
.custom-toast.show { ::v-deep .custom-toast.show {
opacity: 1; opacity: 1;
} }
.page-container {
display: flex;
height: auto;
flex-direction: column;
background-color: #f7f8fa;
padding: 24rpx;
}
.table-list-item {
background: #fff;
padding: 32rpx;
border-radius: 20rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
margin-bottom: 24rpx;
}
.scan-btn {
height: 88rpx;
background: #4b8eff;
display: flex;
justify-content: center;
align-items: center;
border-radius: 12rpx;
font-size: 32rpx;
font-weight: 600;
box-shadow: 0 6rpx 20rpx rgba(55, 132, 251, 0.2);
}
.coding-btn {
padding: 10rpx 0;
color: #fe9a09;
background-color: #fff7eb;
border: 1px solid #fe9a09;
border-radius: 12rpx;
text-align: center;
font-size: 28rpx;
font-weight: 600;
}
/* 控制按钮区域 - 需要单独设置可点击 */ /* 控制按钮区域 - 需要单独设置可点击 */
.bottom-controls { ::v-deep .bottom-controls {
position: absolute; position: absolute;
bottom: 100rpx; bottom: 100rpx;
left: 0; left: 0;
@ -702,7 +663,7 @@ export default {
z-index: 3; z-index: 3;
pointer-events: auto; pointer-events: auto;
} }
.control-btn { ::v-deep .control-btn {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background-color: rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.3);
@ -714,13 +675,13 @@ export default {
margin: 0 20rpx; /* 添加按钮间距 */ margin: 0 20rpx; /* 添加按钮间距 */
} }
.control-icon { ::v-deep .control-icon {
color: #fff; color: #fff;
font-size: 40rpx; font-size: 40rpx;
font-weight: bold; font-weight: bold;
} }
.photo-btn { ::v-deep .photo-btn {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
background-color: rgba(0, 0, 0, 0.3); background-color: rgba(0, 0, 0, 0.3);
@ -733,17 +694,17 @@ export default {
margin: 0 20rpx; /* 添加按钮间距 */ margin: 0 20rpx; /* 添加按钮间距 */
} }
.photo-btn.taking { ::v-deep .photo-btn.taking {
transform: scale(0.9); transform: scale(0.9);
background-color: rgba(75, 142, 255, 0.8); background-color: rgba(75, 142, 255, 0.8);
} }
.photo-btn.disabled { ::v-deep .photo-btn.disabled {
opacity: 0.5; opacity: 0.5;
background-color: rgba(255, 255, 255, 0.1); background-color: rgba(255, 255, 255, 0.1);
} }
.photo-btn-inner { ::v-deep .photo-btn-inner {
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background-color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.9);
@ -751,16 +712,16 @@ export default {
transition: all 0.2s ease; transition: all 0.2s ease;
} }
.photo-btn.taking .photo-btn-inner { ::v-deep .photo-btn.taking .photo-btn-inner {
background-color: #4b8eff; background-color: #4b8eff;
} }
.photo-btn.disabled .photo-btn-inner { ::v-deep .photo-btn.disabled .photo-btn-inner {
background-color: #ccc; background-color: #ccc;
} }
/* 加载层 */ /* 加载层 */
.loading-overlay { ::v-deep .loading-overlay {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -770,7 +731,7 @@ export default {
pointer-events: auto; /* 阻止底层交互 */ pointer-events: auto; /* 阻止底层交互 */
} }
.loading-content { ::v-deep .loading-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
@ -779,7 +740,7 @@ export default {
border-radius: 20rpx; border-radius: 20rpx;
} }
.loading-spinner { ::v-deep .loading-spinner {
width: 60rpx; width: 60rpx;
height: 60rpx; height: 60rpx;
border: 6rpx solid #f3f3f3; border: 6rpx solid #f3f3f3;
@ -798,17 +759,17 @@ export default {
} }
} }
.loading-text { ::v-deep .loading-text {
color: #333; color: #333;
font-size: 32rpx; font-size: 32rpx;
font-weight: bold; font-weight: bold;
} }
.viewfinder-container { ::v-deep .viewfinder-container {
position: absolute; position: absolute;
width: 100%; width: 100%;
height: 40%; height: 40%;
margin-top: 150px; margin-top: 150px;
z-index: 10001; /* 提高取景框层级 */ z-index: 10001 !important; /* 提高取景框层级 */
} }
</style> </style>

View File

@ -77,7 +77,7 @@
@click="onClick($event, item, index)" @click="onClick($event, item, index)"
> >
<div class="title"> <div class="title">
<span class="code">{{ item.code }}</span> <span class="code"><span style="color: #333">{{index + 1 }}. </span>{{ item.code }}</span>
<div class="status-tag"> <div class="status-tag">
<!-- 任务状态标签 --> <!-- 任务状态标签 -->
<uni-tag <uni-tag
@ -397,12 +397,15 @@ const changeTab = (index) => {
active.value = index active.value = index
uni.setStorageSync('scrollTop', 0) uni.setStorageSync('scrollTop', 0)
uni.setStorageSync('activeTab', index) uni.setStorageSync('activeTab', index)
uni.removeStorageSync('queryParams')
uni.removeStorageSync('scrollTop')
if (index == 1) { if (index == 1) {
queryParams.value.appTaskStatus = 0 queryParams.value.appTaskStatus = 0
} else if (index == 2) { } else if (index == 2) {
queryParams.value.appTaskStatus = 1 queryParams.value.appTaskStatus = 1
} }
queryParams.value.pageNum = 1 queryParams.value.pageNum = 1
queryParams.value.pageSize = 20
getTableList(true) getTableList(true)
} }
// change // change

View File

@ -68,7 +68,7 @@
@click="onSignature($event, item)" @click="onSignature($event, item)"
> >
<div class="title"> <div class="title">
<span class="code">{{ item.code || item.businessCode }}</span> <span class="code"><span style="color: #333">{{index + 1 }}. </span>{{ item.code || item.businessCode }}</span>
<div class="cont"> <div class="cont">
<uni-tag <uni-tag
:text="item.taskStatus === 3 ? '未完成' : '已完成'" :text="item.taskStatus === 3 ? '未完成' : '已完成'"
@ -255,7 +255,7 @@ onShow(() => {
if (uni.getStorageSync('queryParams')) { if (uni.getStorageSync('queryParams')) {
queryParams.value = JSON.parse(uni.getStorageSync('queryParams')) queryParams.value = JSON.parse(uni.getStorageSync('queryParams'))
} }
active.value = uni.getStorageSync('activeTab') || 0 active.value = uni.getStorageSync('activeTab') || 1
getTableList() getTableList()
}) })
@ -288,17 +288,17 @@ const onScroll = (e) => {
const changeTab = (index) => { const changeTab = (index) => {
uni.setStorageSync('scrollTop', 0) uni.setStorageSync('scrollTop', 0)
uni.setStorageSync('activeTab', index) uni.setStorageSync('activeTab', index)
uni.removeStorageSync('queryParams')
uni.removeStorageSync('scrollTop')
active.value = index active.value = index
console.log('index', index) console.log('index', index)
queryParams.value.pageNum = 1
queryParams.value.pageSize = 20
if (index == 2) { if (index == 2) {
queryParams.value.statusList = [4] // queryParams.value.statusList = [4] //
queryParams.value.pageNum = 1
queryParams.value.pageSize = 10
getTableList(true) getTableList(true)
} else if (index == 1) { } else if (index == 1) {
queryParams.value.statusList = [3] // queryParams.value.statusList = [3] //
queryParams.value.pageNum = 1
queryParams.value.pageSize = 10
getTableList(true) getTableList(true)
} }
} }

View File

@ -65,7 +65,7 @@
<uni-swipe-action class="swipe-action"> <uni-swipe-action class="swipe-action">
<uni-swipe-action-item> <uni-swipe-action-item>
<div class="title"> <div class="title">
<span class="code">{{ item.code }}</span> <span class="code"><span style="color: #333">{{index + 1 }}. </span>{{ item.code }}</span>
<div class="cont"> <div class="cont">
<uni-tag <uni-tag
:text=" :text="
@ -165,7 +165,7 @@ const queryParams = ref({
keyWord: '', // keyWord: '', //
statusList: [0,1], // statusList: [0,1], //
pageNum: 1, pageNum: 1,
pageSize: 3, pageSize: 20,
}) })
const userId = ref('') // id const userId = ref('') // id
// //
@ -314,13 +314,13 @@ const onScrollTolower = debounce(() => {
const changeTab = (index) => { const changeTab = (index) => {
active.value = index active.value = index
console.log('index', index) console.log('index', index)
queryParams.value.pageNum = 1
queryParams.value.pageSize = 20
if (index == 2) { if (index == 2) {
queryParams.value.statusList = [2,3] // queryParams.value.statusList = [2,3] //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} else if (index == 1) { } else if (index == 1) {
queryParams.value.statusList = [0,1] // queryParams.value.statusList = [0,1] //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} }
} }

View File

@ -49,7 +49,7 @@
<uni-swipe-action-item @click="onClick($event, item)" :right-options="active==1 ? options : []"> <uni-swipe-action-item @click="onClick($event, item)" :right-options="active==1 ? options : []">
<div class="title"> <div class="title">
<div class="title-left"> <div class="title-left">
<span class="code">{{ item.repairCode }}</span> <span class="code"><span style="color: #333">{{index + 1 }}. </span>{{ item.repairCode }}</span>
<span class="sub-code" v-if="item.backCode">{{ `${item.backCode}-${item.level}` }}</span> <span class="sub-code" v-if="item.backCode">{{ `${item.backCode}-${item.level}` }}</span>
</div> </div>
<div class="title-right"> <div class="title-right">

View File

@ -60,7 +60,7 @@
<uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> --> <uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> -->
<div class="title"> <div class="title">
<div class="title-left"> <div class="title-left">
<span class="code">{{ `${item.backCode}-${item.level}` }}</span> <span class="code"><span style="color: #333">{{index + 1 }}. </span>{{ `${item.backCode}-${item.level}` }}</span>
<span class="sub-code">{{ item.repairCode }}</span> <span class="sub-code">{{ item.repairCode }}</span>
</div> </div>
<div class="title-right"> <div class="title-right">

View File

@ -59,7 +59,7 @@
<!-- <uni-swipe-action> <!-- <uni-swipe-action>
<uni-swipe-action-item @click="onClick($event, item)" :right-options="item.taskStatus==0 ? options:[]"> --> <uni-swipe-action-item @click="onClick($event, item)" :right-options="item.taskStatus==0 ? options:[]"> -->
<div class="title"> <div class="title">
<span style="font-size: 15px; font-weight: 800">{{ item.scrapCode }}</span> <span style="font-size: 15px; font-weight: 800"><span style="color: #333">{{index + 1 }}. </span>{{ item.scrapCode }}</span>
<div class="status-tag"> <div class="status-tag">
<uni-tag v-if="item.taskStatus == 0" text="未完成" type="warning" custom-style="warningStyle"/> <uni-tag v-if="item.taskStatus == 0" text="未完成" type="warning" custom-style="warningStyle"/>
<uni-tag v-if="item.taskStatus == 1" text="已完成" type="success" custom-style="successStyle"/> <uni-tag v-if="item.taskStatus == 1" text="已完成" type="success" custom-style="successStyle"/>
@ -140,7 +140,7 @@ const queryParams = ref({
endTime: dateArray.value[1] || '', endTime: dateArray.value[1] || '',
keyWord: '', // keyWord: '', //
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 20,
appTaskStatus:0, appTaskStatus:0,
}) })
@ -255,13 +255,13 @@ const onScrollTolower = debounce(() => {
// tap // tap
const changeTab = (index) => { const changeTab = (index) => {
active.value = index active.value = index
queryParams.value.pageNum = 1
queryParams.value.pageSize = 20
if (index == 1) { if (index == 1) {
queryParams.value.appTaskStatus = 0 // queryParams.value.appTaskStatus = 0 //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} else if (index == 2) { } else if (index == 2) {
queryParams.value.appTaskStatus = 1 // queryParams.value.appTaskStatus = 1 //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} }
} }

View File

@ -94,7 +94,7 @@
<checkbox-group v-if="active == 1" @change="onChangeChecked(item)"> <checkbox-group v-if="active == 1" @change="onChangeChecked(item)">
<checkbox :checked="item.checked"/> <checkbox :checked="item.checked"/>
</checkbox-group> </checkbox-group>
<span style="font-size: 15px; font-weight: 800;color: #3784fb;">{{ item.repairNum }}</span> <span style="font-size: 15px; font-weight: 800;color: #3784fb;"><span style="color: #333">{{index + 1 }}. </span>{{ item.repairNum }}</span>
</div> </div>
<div class="title-right"> <div class="title-right">
<uni-tag v-if="item.taskStatus == 10" text="未完成" type="warning" custom-style="warningStyle"/> <uni-tag v-if="item.taskStatus == 10" text="未完成" type="warning" custom-style="warningStyle"/>
@ -419,13 +419,13 @@ const onScrollTolower = debounce(() => {
// tap // tap
const changeTab = (index) => { const changeTab = (index) => {
active.value = index active.value = index
queryParams.value.pageNum = 1
queryParams.value.pageSize = 20
if (index == 1) { if (index == 1) {
queryParams.value.appTaskStatus = 10 // queryParams.value.appTaskStatus = 10 //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} else if (index == 2) { } else if (index == 2) {
queryParams.value.appTaskStatus = 11 // queryParams.value.appTaskStatus = 11 //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} }
} }

View File

@ -67,7 +67,7 @@
<!-- <uni-swipe-action> --> <!-- <uni-swipe-action> -->
<!-- <uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> --> <!-- <uni-swipe-action-item @click="onClick($event, item)" :right-options="options"> -->
<div class="title"> <div class="title">
<span style="font-size: 15px; font-weight: 800;color: #3784fb;">{{ item.inputCode }}</span> <span style="font-size: 15px; font-weight: 800;color: #3784fb;"><span style="color: #333">{{index + 1 }}. </span>{{ item.inputCode }}</span>
<!-- <span :style="{ color: active == 1 ? '#ff4d4f' : '#3784fb' }">{{active == 1 ? '未完成' : '已完成'}}</span> --> <!-- <span :style="{ color: active == 1 ? '#ff4d4f' : '#3784fb' }">{{active == 1 ? '未完成' : '已完成'}}</span> -->
<div class="title-right"> <div class="title-right">
<uni-tag v-if="item.taskStatus == 0" text="未完成" type="warning" custom-style="warningStyle"/> <uni-tag v-if="item.taskStatus == 0" text="未完成" type="warning" custom-style="warningStyle"/>
@ -308,13 +308,15 @@ const changeTab = (index) => {
active.value = index active.value = index
uni.setStorageSync('scrollTop', 0) uni.setStorageSync('scrollTop', 0)
uni.setStorageSync('activeTab', index) uni.setStorageSync('activeTab', index)
uni.removeStorageSync('queryParams')
uni.removeStorageSync('scrollTop')
queryParams.value.pageNum = 1
queryParams.value.pageSize = 20
if (index == 1) { if (index == 1) {
queryParams.value.appTaskStatus = 0 // queryParams.value.appTaskStatus = 0 //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} else if (index == 2) { } else if (index == 2) {
queryParams.value.appTaskStatus = 1 // queryParams.value.appTaskStatus = 1 //
queryParams.value.pageNum = 1
getTableList(true) getTableList(true)
} }
} }