编码采集页面、铭牌更新页面、日期更新页面问题修改
This commit is contained in:
parent
43b0ded360
commit
0f55cce0c4
|
|
@ -7,12 +7,6 @@
|
||||||
<uni-icons type="left" size="20" color="black"></uni-icons>
|
<uni-icons type="left" size="20" color="black"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:right>
|
|
||||||
<view style="display: flex; align-items: center" @click="onQrCode">
|
|
||||||
<!-- 文本 -->
|
|
||||||
<text>二维码</text>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</uni-nav-bar>
|
</uni-nav-bar>
|
||||||
<view class="accept">
|
<view class="accept">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|
@ -24,6 +18,12 @@
|
||||||
">
|
">
|
||||||
查询
|
查询
|
||||||
</button>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -119,7 +119,10 @@ const handleSearch = () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (res.data.length === 1) {
|
if (res.data.length === 1) {
|
||||||
handleCheck(res.data[0])
|
let item ={
|
||||||
|
item:res.data[0]
|
||||||
|
}
|
||||||
|
handleCheck(item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
|
@ -153,7 +156,7 @@ const handleCheck = (item) => {
|
||||||
|
|
||||||
// 处理扫描成功事件
|
// 处理扫描成功事件
|
||||||
const handleScanSuccess = (result) => {
|
const handleScanSuccess = (result) => {
|
||||||
keyWord.value = result?.data?.split('?qrcode=')[1]
|
keyWord.value = result?.data?.split('?qrcode=')[1] || result?.data
|
||||||
if (keyWord.value === '') {
|
if (keyWord.value === '') {
|
||||||
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
uni.showToast({ title: '扫码识别失败', icon: 'none' })
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -193,7 +196,7 @@ const handleSubmit = () => {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style scoped lang="scss">
|
||||||
.accept {
|
.accept {
|
||||||
padding: 24rpx;
|
padding: 24rpx;
|
||||||
height: 90vh;
|
height: 90vh;
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,7 @@ const handleThisCheckTimeChange = (date) => {
|
||||||
if (date) {
|
if (date) {
|
||||||
const nextDate = new Date(date)
|
const nextDate = new Date(date)
|
||||||
nextDate.setFullYear(nextDate.getFullYear() + 1)
|
nextDate.setFullYear(nextDate.getFullYear() + 1)
|
||||||
|
nextDate.setDate(nextDate.getDate() - 1) // 天数减一
|
||||||
formData.value.nextCheckTime = formatDate(nextDate)
|
formData.value.nextCheckTime = formatDate(nextDate)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -264,7 +265,7 @@ const handleScanQrCode = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleScanSuccess = (result) => {
|
const handleScanSuccess = (result) => {
|
||||||
const qrCode = result?.data?.split('?qrcode=')[1]
|
const qrCode = result?.data?.split('?qrcode=')[1] || result?.data
|
||||||
if (qrCode) {
|
if (qrCode) {
|
||||||
searchParams.value.keyWord = ''
|
searchParams.value.keyWord = ''
|
||||||
formData.value.qrCode = qrCode
|
formData.value.qrCode = qrCode
|
||||||
|
|
@ -336,7 +337,7 @@ const formatDate = (date) => {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style scoped lang="scss">
|
||||||
.container {
|
.container {
|
||||||
padding: 24rpx 24rpx 100rpx;
|
padding: 24rpx 24rpx 100rpx;
|
||||||
background-color: #f7f8fa;
|
background-color: #f7f8fa;
|
||||||
|
|
|
||||||
|
|
@ -80,13 +80,14 @@ import SelectOne from '../tree-select/select-one'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
import { useMemberStore } from '@/stores'
|
||||||
|
const memberStore = useMemberStore()
|
||||||
const maName = ref('') // ✅ 机具类型
|
const maName = ref('') // ✅ 机具类型
|
||||||
const maModel = ref('') // 机具规格
|
const maModel = ref('') // 机具规格
|
||||||
const maCode = ref([]) // 机具编码
|
const maCode = ref([]) // 机具编码
|
||||||
const maCodeOne = ref('')
|
const maCodeOne = ref('')
|
||||||
const supplier = ref('') // 出厂厂家
|
const supplier = ref('') // 出厂厂家
|
||||||
const repairMan = ref('王鹏') // 检修员
|
const repairMan = ref(ref(memberStore.userInfo.nickName || '')) // 检修员
|
||||||
const checkMan = ref('高民') // 检验员
|
const checkMan = ref('高民') // 检验员
|
||||||
const phone = ref('0551-63703966') // 联系方式
|
const phone = ref('0551-63703966') // 联系方式
|
||||||
const modelId = ref('')
|
const modelId = ref('')
|
||||||
|
|
@ -277,7 +278,7 @@ const confirmAdd = async () => {
|
||||||
title: '新增成功',
|
title: '新增成功',
|
||||||
icon: 'success',
|
icon: 'success',
|
||||||
})
|
})
|
||||||
clearForm()
|
//clearForm()
|
||||||
//uni.navigateBack()
|
//uni.navigateBack()
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue