编码采集页面、铭牌更新页面、日期更新页面问题修改

This commit is contained in:
jiang 2025-08-03 15:42:38 +08:00
parent 43b0ded360
commit 0f55cce0c4
3 changed files with 19 additions and 14 deletions

View File

@ -7,12 +7,6 @@
<uni-icons type="left" size="20" color="black"></uni-icons>
</view>
</template>
<template v-slot:right>
<view style="display: flex; align-items: center" @click="onQrCode">
<!-- 文本 -->
<text>二维码</text>
</view>
</template>
</uni-nav-bar>
<view class="accept">
<div class="card">
@ -24,6 +18,12 @@
">
查询
</button>
<button type="primary" size="mini" class="btn-cont" @click="onQrCode"
style="margin-left: 10px;background: linear-gradient(135deg, #4b8eff 0%, #3784fb 100%);
">
二维码
</button>
</div>
</div>
@ -119,7 +119,10 @@ const handleSearch = () => {
}
})
if (res.data.length === 1) {
handleCheck(res.data[0])
let item ={
item:res.data[0]
}
handleCheck(item)
}
}
}).catch(error => {
@ -153,7 +156,7 @@ const handleCheck = (item) => {
//
const handleScanSuccess = (result) => {
keyWord.value = result?.data?.split('?qrcode=')[1]
keyWord.value = result?.data?.split('?qrcode=')[1] || result?.data
if (keyWord.value === '') {
uni.showToast({ title: '扫码识别失败', icon: 'none' })
} else {
@ -193,7 +196,7 @@ const handleSubmit = () => {
}
</script>
<style lang="scss">
<style scoped lang="scss">
.accept {
padding: 24rpx;
height: 90vh;

View File

@ -247,6 +247,7 @@ const handleThisCheckTimeChange = (date) => {
if (date) {
const nextDate = new Date(date)
nextDate.setFullYear(nextDate.getFullYear() + 1)
nextDate.setDate(nextDate.getDate() - 1) //
formData.value.nextCheckTime = formatDate(nextDate)
}
}
@ -264,7 +265,7 @@ const handleScanQrCode = () => {
}
const handleScanSuccess = (result) => {
const qrCode = result?.data?.split('?qrcode=')[1]
const qrCode = result?.data?.split('?qrcode=')[1] || result?.data
if (qrCode) {
searchParams.value.keyWord = ''
formData.value.qrCode = qrCode
@ -336,7 +337,7 @@ const formatDate = (date) => {
}
</script>
<style lang="scss">
<style scoped lang="scss">
.container {
padding: 24rpx 24rpx 100rpx;
background-color: #f7f8fa;

View File

@ -80,13 +80,14 @@ import SelectOne from '../tree-select/select-one'
import {
onLoad,
} from '@dcloudio/uni-app'
import { useMemberStore } from '@/stores'
const memberStore = useMemberStore()
const maName = ref('') //
const maModel = ref('') //
const maCode = ref([]) //
const maCodeOne = ref('')
const supplier = ref('') //
const repairMan = ref('王鹏') //
const repairMan = ref(ref(memberStore.userInfo.nickName || '')) //
const checkMan = ref('高民') //
const phone = ref('0551-63703966') //
const modelId = ref('')
@ -277,7 +278,7 @@ const confirmAdd = async () => {
title: '新增成功',
icon: 'success',
})
clearForm()
//clearForm()
//uni.navigateBack()
}
} catch (error) {