zhang_li
8 months ago
5 changed files with 202 additions and 2 deletions
@ -0,0 +1,188 @@ |
|||
<template> |
|||
<!-- 添加维修工单 --> |
|||
<view class="add-form-container"> |
|||
<view class="screen-input"> |
|||
<u-search v-model='number' :show-action='false' :bg-color="'white'" :border-color="'#E4E4E4'" |
|||
:shape="'square'" :height="80" :placeholder="'请扫描设备或者库位'" :clearabled="true" @blur="blur()" |
|||
@confirm="handelScanMsg"> |
|||
</u-search> |
|||
</view> |
|||
<view class="title"> |
|||
<view class=""> |
|||
详细信息 |
|||
</view> |
|||
</view> |
|||
<view class="list"> |
|||
<view class="item " v-for="(item,index) in list" :key="index"> |
|||
<view class="item-box"> |
|||
<view class="spare-title"> |
|||
<view class="title-txt"> |
|||
库位名称:{{item.name}} |
|||
</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>库位编码:</view> |
|||
<view>{{item.locationNumber}}</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>库位名称:</view> |
|||
<view>{{item.name}}</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>库区编码:</view> |
|||
<view>{{item.areaNumber}}</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>库区名称:</view> |
|||
<view>{{item.areaName}}</view> |
|||
</view> |
|||
|
|||
<view class="dec"> |
|||
<view>库位类型:</view> |
|||
<view>{{item.isInAccount == 'TRUE'?'帐内库' :'帐外库'}}</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>设备编码:</view> |
|||
<view>{{item.itemNumber}}</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>设备名称:</view> |
|||
<view>{{item.itemName}}</view> |
|||
</view> |
|||
<view class="dec"> |
|||
<view>库存:</view> |
|||
<view>{{item.qty}}</view> |
|||
</view> |
|||
|
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
|
|||
</view> |
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import { |
|||
onLoad |
|||
} from '@dcloudio/uni-app' |
|||
import { |
|||
ref, |
|||
getCurrentInstance |
|||
} from 'vue' |
|||
import * as locationApi from "@/api/location.js" |
|||
const { proxy } = getCurrentInstance() |
|||
const number = ref('LN0000000001') |
|||
const list = ref([]) |
|||
function getPdaItemAndLocation() { |
|||
locationApi.pdaItemAndLocation(number.value).then((res) => { |
|||
if(!res.data||res.data.length==0){ |
|||
list.value = [] |
|||
if(res.msg){ |
|||
proxy.$modal.showToast(res.msg) |
|||
} |
|||
return; |
|||
} |
|||
list.value = res.data |
|||
}).catch((err)=>{ |
|||
list.value = [] |
|||
proxy.$modal.showToast(err.msg) |
|||
}) |
|||
} |
|||
function blur() { |
|||
if (number.value) { |
|||
getPdaItemAndLocation() |
|||
} |
|||
} |
|||
// 扫描设备条码 |
|||
function handelScanMsg() { |
|||
getPdaItemAndLocation() |
|||
} |
|||
onLoad(async (option) => { |
|||
getPdaItemAndLocation() |
|||
|
|||
}) |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.add-form-container { |
|||
min-height: 100vh; |
|||
background: white; |
|||
} |
|||
|
|||
.u-form-item { |
|||
padding: 20rpx 30rpx; |
|||
} |
|||
|
|||
.screen-input { |
|||
margin: 30rpx; |
|||
} |
|||
|
|||
.title { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 0px 30rpx; |
|||
// background: #f5f5f5; |
|||
margin-top: 10px; |
|||
font-weight: bold; |
|||
font-size: 32rpx; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
flex: 1; |
|||
border-left: 10rpx solid #409eff; |
|||
padding-left: 20rpx; |
|||
font-weight: bold; |
|||
color: #409eff; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
.list { |
|||
padding: 30rpx; |
|||
|
|||
.item { |
|||
display: flex; |
|||
margin-bottom: 20rpx; |
|||
|
|||
.item-box { |
|||
background: #F5F5F5; |
|||
border-radius: 12rpx; |
|||
flex: 1; |
|||
width: 0rpx; |
|||
} |
|||
|
|||
.spare-title { |
|||
padding: 20rpx 30rpx; |
|||
border-bottom: 1px solid #e4e4e4; |
|||
|
|||
.title-txt { |
|||
color: #409eff; |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
} |
|||
} |
|||
|
|||
.dec { |
|||
color: #9c9c9c; |
|||
padding: 20rpx 30rpx 20rpx; |
|||
display: flex; |
|||
|
|||
view { |
|||
&:nth-child(1) { |
|||
width: 150rpx; |
|||
} |
|||
|
|||
&:nth-child(2) { |
|||
flex: 1; |
|||
word-wrap: break-word; |
|||
width: 0px; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|||
} |
|||
} |
|||
</style> |
After Width: | Height: | Size: 22 KiB |
Loading…
Reference in new issue