bug修复
This commit is contained in:
parent
f73db43be1
commit
1b614792f5
|
|
@ -3,6 +3,9 @@
|
|||
<div class="card">
|
||||
<uni-row :gutter="24">
|
||||
<uni-col :span="6">任务创建:</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn" @tap="codeSearch">编码检索</view>
|
||||
</uni-col>
|
||||
<uni-col :span="6">
|
||||
<view class="coding-btn" @tap="codeScanIdentify">编码识别</view>
|
||||
</uni-col>
|
||||
|
|
@ -19,9 +22,9 @@
|
|||
/>
|
||||
<div class="card">
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center; margin-bottom: 20px">
|
||||
<uni-col :span="8">设备编码:</uni-col>
|
||||
<uni-col :span="6">设备编码:</uni-col>
|
||||
<uni-col :span="16">
|
||||
{{ maInfo.maCode }}
|
||||
<uni-easyinput v-model="maInfo.maCode" placeholder="请输入设备编码" maxlength="20" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row :gutter="24" style="display: flex; align-items: center; margin-bottom: 20px">
|
||||
|
|
@ -100,7 +103,7 @@
|
|||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getMachine, insertBack, getMachineByQrCodeApi } from '../../services/back.js'
|
||||
import { getMachine, insertBack, getMachineByQrCodeApi,getMachineByCodeApi } from '../../services/back.js'
|
||||
import ScanQrCode from '@/pages/devicesSearch/ScanQrCode.vue'
|
||||
import { baseURL } from '@/utils/http'
|
||||
import { useMemberStore } from '@/stores'
|
||||
|
|
@ -181,6 +184,27 @@ const changeRadio = (e) => {
|
|||
apDetection.value = e.detail.value
|
||||
}
|
||||
|
||||
|
||||
const codeSearch = async () => {
|
||||
let param = {
|
||||
maCode: maInfo.value.maCode,
|
||||
}
|
||||
//通过二维码获取相绑定的设备编码
|
||||
const res = await getMachineByCodeApi(param)
|
||||
console.log(res)
|
||||
if (res.code == 200) {
|
||||
|
||||
maInfo.value = res.data
|
||||
console.log('22222222', maInfo.value)
|
||||
|
||||
// else {
|
||||
// uni.showToast({ title: '未查询到该设备编号信息!', icon: 'none' })
|
||||
// }
|
||||
} else {
|
||||
uni.showToast({ title: res.data.msg, icon: 'none' })
|
||||
}
|
||||
}
|
||||
|
||||
//提交
|
||||
const submitCode = () => {
|
||||
if (maInfo.value.agreementId == undefined) {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,15 @@ export const getMachineByQrCodeApi = (data) => {
|
|||
})
|
||||
}
|
||||
|
||||
// 根据设备编码查询信息
|
||||
export const getMachineByCodeApi = (data) => {
|
||||
return http({
|
||||
method: 'GET',
|
||||
url: '/material/back_apply_info/getMachineByCode',
|
||||
data:data,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 获取退料明细(退料人退料时间)
|
||||
export const getDetailsByIdApi = (data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue