|
@@ -1,11 +1,11 @@
|
|
|
-<template>
|
|
|
- <view>
|
|
|
- <u-navbar>
|
|
|
- <view class="u-navbar ">
|
|
|
- <view class="title">
|
|
|
- 出库设备清单<text>({{recordsTotal}})</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+<template>
|
|
|
+ <view>
|
|
|
+ <u-navbar>
|
|
|
+ <view class="u-navbar ">
|
|
|
+ <view class="title">
|
|
|
+ 出库设备清单<text>({{recordsTotal}})</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="details" v-if="status==1" slot="bottom">
|
|
|
<view class="list-details">
|
|
|
<view class="list-head">
|
|
@@ -17,7 +17,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
</u-navbar>
|
|
|
<u-popup v-model="showpopup" class="scanpopo" mode="bottom"
|
|
|
border-radius="14"
|
|
@@ -76,16 +76,16 @@
|
|
|
style="width: 100%; height: 300px;"></camera>
|
|
|
<!-- #endif -->
|
|
|
</u-popup>
|
|
|
- <view class="listHead " :class="status==1?'container':''" >
|
|
|
- <view class="list" v-for="(item,index) in list" :key="index">
|
|
|
- <!-- 清单信息 -->
|
|
|
- <view class="list-infos">
|
|
|
- <view class="infos-head">
|
|
|
- <view class="name">
|
|
|
- {{item.deviceName}}
|
|
|
+ <view class="listHead " :class="status==1?'container':''" >
|
|
|
+ <view class="list" v-for="(item,index) in list" :key="index">
|
|
|
+ <!-- 清单信息 -->
|
|
|
+ <view class="list-infos">
|
|
|
+ <view class="infos-head">
|
|
|
+ <view class="name">
|
|
|
+ {{item.deviceName}}
|
|
|
</view>
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
<view class="infos">
|
|
@@ -136,10 +136,10 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
-
|
|
|
- <view class="infos" v-if="false">
|
|
|
- <view class="infos-1">
|
|
|
-
|
|
|
+
|
|
|
+ <view class="infos" v-if="false">
|
|
|
+ <view class="infos-1">
|
|
|
+
|
|
|
<view class="infos-item">
|
|
|
<view class="item-name">
|
|
|
{{recordItemStatus(item.status)}}:
|
|
@@ -148,9 +148,9 @@
|
|
|
{{item.needCount}}
|
|
|
</view>
|
|
|
</view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view class="infos-2" v-if="false">
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="infos-2" v-if="false">
|
|
|
<view class="infos-item">
|
|
|
<view class="item-name">
|
|
|
库存:
|
|
@@ -158,29 +158,29 @@
|
|
|
<view class="item-value" :style="'color:'+recordStatusColor(1)">
|
|
|
{{item.deviceInfo?item.deviceInfo.count:''}}
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <!-- 地址 -->
|
|
|
- <view class="address">
|
|
|
- <view class="name">
|
|
|
- 位置:
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- {{item.deviceInfo.addressId?item.deviceInfo.addressId:'未录入'}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <!-- 备注 -->
|
|
|
- <view class="remark" v-if="false">
|
|
|
- <view class="name">
|
|
|
- 备注:
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- 22
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <!-- 地址 -->
|
|
|
+ <view class="address">
|
|
|
+ <view class="name">
|
|
|
+ 位置:
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ {{item.deviceInfo.addressId?item.deviceInfo.addressId:'未录入'}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <!-- 备注 -->
|
|
|
+ <view class="remark" v-if="false">
|
|
|
+ <view class="name">
|
|
|
+ 备注:
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ 22
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="prepare-out" v-if="item.realDeviceList&&item.realDeviceList.length">
|
|
|
<view class="head">
|
|
|
<view class="amount">
|
|
@@ -234,95 +234,95 @@
|
|
|
|
|
|
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="prepare-out 2" v-else>
|
|
|
- <view class="head">
|
|
|
- <view class="amount">
|
|
|
- <view class="title">
|
|
|
- 实际领用:
|
|
|
- </view>
|
|
|
- <view class="value">
|
|
|
- {{scanMap.get(item.deviceName+key+item.model+key+item.specifications).length}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="unfold" v-show="scanMap.get(item.deviceName+key+item.model+key+item.specifications).length>2" @click="changeShow(item)">
|
|
|
- {{item.show?'收起':'展开'}}<u-icon name="arrow-down"></u-icon>
|
|
|
- <!-- <view class="option" v-if="show==true">
|
|
|
-
|
|
|
-
|
|
|
- </view> -->
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <!-- 编号 -->
|
|
|
- <view class="serial-number" v-for="(item2,j) in scanMap.get(item.deviceName+key+item.model+key+item.specifications)"
|
|
|
- v-show="j<2||item.show" :key="j">
|
|
|
- <view class="item">
|
|
|
- <view class="text">
|
|
|
- 设备编号:
|
|
|
- </view>
|
|
|
- <view class="number" @click="delOutList(item2)">
|
|
|
- <span v-if="item2.healthStatus!=1"
|
|
|
- :style="' margin-right: 1px;color:'+recordStatusColor(item2.healthStatus)">[{{item2.healthStatusN}}]</span>
|
|
|
- <span v-if="item2.status!=1"
|
|
|
- :style="' margin-right: 1px;color:'+recordStatusColor(item2.status)">[{{item2.statusN}}]</span>
|
|
|
- {{showCode(item2)}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="del" @click="delOutList(item2)">
|
|
|
- <u-icon name="trash-fill"></u-icon>
|
|
|
- <!-- <img src="@/assets/img/riLine-delete-bin-line Copy@1x.png" alt=""> -->
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ <view class="prepare-out 2" v-else>
|
|
|
+ <view class="head">
|
|
|
+ <view class="amount">
|
|
|
+ <view class="title">
|
|
|
+ 实际领用:
|
|
|
+ </view>
|
|
|
+ <view class="value">
|
|
|
+ {{scanMap.get(item.deviceName+key+item.model+key+item.specifications).length}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="unfold" v-show="scanMap.get(item.deviceName+key+item.model+key+item.specifications).length>2" @click="changeShow(item)">
|
|
|
+ {{item.show?'收起':'展开'}}<u-icon name="arrow-down"></u-icon>
|
|
|
+ <!-- <view class="option" v-if="show==true">
|
|
|
+
|
|
|
+
|
|
|
+ </view> -->
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <!-- 编号 -->
|
|
|
+ <view class="serial-number" v-for="(item2,j) in scanMap.get(item.deviceName+key+item.model+key+item.specifications)"
|
|
|
+ v-show="j<2||item.show" :key="j">
|
|
|
+ <view class="item">
|
|
|
+ <view class="text">
|
|
|
+ 设备编号:
|
|
|
+ </view>
|
|
|
+ <view class="number" @click="delOutList(item2)">
|
|
|
+ <span v-if="item2.healthStatus!=1"
|
|
|
+ :style="' margin-right: 1px;color:'+recordStatusColor(item2.healthStatus)">[{{item2.healthStatusN}}]</span>
|
|
|
+ <span v-if="item2.status!=1"
|
|
|
+ :style="' margin-right: 1px;color:'+recordStatusColor(item2.status)">[{{item2.statusN}}]</span>
|
|
|
+ {{showCode(item2)}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="del" @click="delOutList(item2)">
|
|
|
+ <u-icon name="trash-fill"></u-icon>
|
|
|
+ <!-- <img src="@/assets/img/riLine-delete-bin-line Copy@1x.png" alt=""> -->
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<textarea class="textarea"
|
|
|
|
|
|
- placeholder="备注" name="" id="" v-model="item.remark" cols="30" rows="1"></textarea>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view class="list" v-if="noScanList.length" >
|
|
|
- <view class="list-infos">
|
|
|
- <view class="infos-head">
|
|
|
- <view class="name">
|
|
|
- 扫码结果不符合清单
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <view class="infos">
|
|
|
- <view class="infos-1">
|
|
|
- <view class="infos-item">
|
|
|
-
|
|
|
- <view class="item-value">
|
|
|
- 以下设备不计入出库设备中
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
-
|
|
|
- <view class="prepare-out" >
|
|
|
- <view class="head">
|
|
|
- <view class="amount">
|
|
|
- <view class="title">
|
|
|
- 不符合清单:
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
- <!-- 编号 -->
|
|
|
- <view class="serial-number" v-for="(item,index) in noScanList" :key="index">
|
|
|
- <view class="item">
|
|
|
- <view class="text">
|
|
|
- 设备编号:
|
|
|
- </view>
|
|
|
- <view class="number">
|
|
|
- {{showCode(item)}}
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ placeholder="备注" name="" id="" v-model="item.remark" cols="30" rows="1"></textarea>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="list" v-if="noScanList.length" >
|
|
|
+ <view class="list-infos">
|
|
|
+ <view class="infos-head">
|
|
|
+ <view class="name">
|
|
|
+ 扫码结果不符合清单
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="infos">
|
|
|
+ <view class="infos-1">
|
|
|
+ <view class="infos-item">
|
|
|
+
|
|
|
+ <view class="item-value">
|
|
|
+ 以下设备不计入出库设备中
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+
|
|
|
+ <view class="prepare-out" >
|
|
|
+ <view class="head">
|
|
|
+ <view class="amount">
|
|
|
+ <view class="title">
|
|
|
+ 不符合清单:
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <!-- 编号 -->
|
|
|
+ <view class="serial-number" v-for="(item,index) in noScanList" :key="index">
|
|
|
+ <view class="item">
|
|
|
+ <view class="text">
|
|
|
+ 设备编号:
|
|
|
+ </view>
|
|
|
+ <view class="number">
|
|
|
+ {{showCode(item)}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="item">
|
|
|
<view class="text">
|
|
|
设备名称:
|
|
@@ -330,34 +330,34 @@
|
|
|
<view class="number">
|
|
|
{{item.title}}
|
|
|
</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
</view>
|
|
|
-
|
|
|
- </view>
|
|
|
+
|
|
|
+ </view>
|
|
|
|
|
|
<u-divider border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
|
|
|
|
|
|
- </view>
|
|
|
- <!-- 确认出库 -->
|
|
|
- <view class="bottom" v-if="status==1">
|
|
|
- <u-button type="primary" @click="gotoOut()">确认出库</u-button>
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
- import * as API from '@/apis/pagejs/storeManagement.js'
|
|
|
- import {
|
|
|
- recordItemStatus,
|
|
|
- recordStatusColor
|
|
|
- } from '@/apis/status.js'
|
|
|
- export default {
|
|
|
- data() {
|
|
|
+ </view>
|
|
|
+ <!-- 确认出库 -->
|
|
|
+ <view class="bottom" v-if="status==1">
|
|
|
+ <u-button type="primary" @click="gotoOut()">确认出库</u-button>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import * as API from '@/apis/pagejs/storeManagement.js'
|
|
|
+ import {
|
|
|
+ recordItemStatus,
|
|
|
+ recordStatusColor
|
|
|
+ } from '@/apis/status.js'
|
|
|
+ export default {
|
|
|
+ data() {
|
|
|
return {
|
|
|
nowscan:{
|
|
|
"title": "",
|
|
@@ -372,34 +372,34 @@
|
|
|
status:"",
|
|
|
deviceposition:"back",
|
|
|
scanFunctionIsUseable:true,
|
|
|
- showpopup:false,
|
|
|
- show: false,
|
|
|
- list: [],
|
|
|
- scanList: [],
|
|
|
+ showpopup:false,
|
|
|
+ show: false,
|
|
|
+ list: [],
|
|
|
+ scanList: [],
|
|
|
id: "",
|
|
|
- key:"-#jp$-",
|
|
|
- recordsTotal: 0,
|
|
|
- listFrom: {
|
|
|
- pageIndex: 1,
|
|
|
- pageSize: 99999,
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- onReachBottom() {
|
|
|
-
|
|
|
- if (this.list.length < this.recordsTotal) {
|
|
|
- this.myLoadmore();
|
|
|
- }
|
|
|
- },
|
|
|
- onLoad(op) {
|
|
|
+ key:"-#jp$-",
|
|
|
+ recordsTotal: 0,
|
|
|
+ listFrom: {
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 99999,
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+
|
|
|
+ if (this.list.length < this.recordsTotal) {
|
|
|
+ this.myLoadmore();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onLoad(op) {
|
|
|
this.id = op.id
|
|
|
- this.status = op.status
|
|
|
- this.getList()
|
|
|
- },
|
|
|
- onReady() {
|
|
|
-
|
|
|
- },
|
|
|
+ this.status = op.status
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
+ onReady() {
|
|
|
+
|
|
|
+ },
|
|
|
computed: {
|
|
|
noScanList() {
|
|
|
var list= this.list.map(item=>{
|
|
@@ -412,28 +412,28 @@
|
|
|
})
|
|
|
|
|
|
return reList
|
|
|
- },
|
|
|
- scanMap() {
|
|
|
- var map = new Map()
|
|
|
-
|
|
|
- this.scanList.forEach(item => {
|
|
|
- var title=item.title+this.key+item.model+this.key+item.specifications
|
|
|
- if (map.has(title)) {
|
|
|
- var list = map.get(title)
|
|
|
- list.unshift(item)
|
|
|
- map.set(title, list)
|
|
|
- } else {
|
|
|
- map.set(title, [item])
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- console.log(map)
|
|
|
- return map
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
- recordItemStatus,
|
|
|
+ },
|
|
|
+ scanMap() {
|
|
|
+ var map = new Map()
|
|
|
+
|
|
|
+ this.scanList.forEach(item => {
|
|
|
+ var title=item.title+this.key+item.model+this.key+item.specifications
|
|
|
+ if (map.has(title)) {
|
|
|
+ var list = map.get(title)
|
|
|
+ list.unshift(item)
|
|
|
+ map.set(title, list)
|
|
|
+ } else {
|
|
|
+ map.set(title, [item])
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ console.log(map)
|
|
|
+ return map
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ recordItemStatus,
|
|
|
recordStatusColor,
|
|
|
ckInfo(item) {
|
|
|
|
|
@@ -481,9 +481,9 @@
|
|
|
icon: "none"
|
|
|
})
|
|
|
})
|
|
|
- },
|
|
|
- gotoOut() {
|
|
|
- //recordData
|
|
|
+ },
|
|
|
+ gotoOut() {
|
|
|
+ //recordData
|
|
|
|
|
|
var list=[];
|
|
|
var bl=true;
|
|
@@ -539,7 +539,7 @@
|
|
|
console.log('用户点击取消');
|
|
|
}
|
|
|
}
|
|
|
- });
|
|
|
+ });
|
|
|
},
|
|
|
error(e) {
|
|
|
console.log(e);
|
|
@@ -586,53 +586,53 @@
|
|
|
// this.src = res.tempImagePath
|
|
|
// }
|
|
|
// });
|
|
|
- },
|
|
|
- gotoscanH5(val) {
|
|
|
+ },
|
|
|
+ gotoscanH5(val) {
|
|
|
console.log('111')
|
|
|
-
|
|
|
- var _this = this;
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- editable: true,
|
|
|
- //content: '这是一个模态弹窗',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- _this.getscan(res.content)
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- delOutListMethod(deviceInfo) {
|
|
|
- var c = this.scanList.findIndex(item => {
|
|
|
- return item.id == deviceInfo.id
|
|
|
- })
|
|
|
- if (c > -1) {
|
|
|
- this.scanList.splice(c, 1)
|
|
|
- uni.showToast({
|
|
|
- title: "删除成功",
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
- delOutList(item) {
|
|
|
- var _this = this;
|
|
|
- uni.showModal({
|
|
|
- title: '提示',
|
|
|
- //editable:true,
|
|
|
- content: '确认是否删除',
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm) {
|
|
|
- _this.delOutListMethod(item)
|
|
|
- } else if (res.cancel) {
|
|
|
- console.log('用户点击取消');
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
+ var _this = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ editable: true,
|
|
|
+ //content: '这是一个模态弹窗',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _this.getscan(res.content)
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ },
|
|
|
+ delOutListMethod(deviceInfo) {
|
|
|
+ var c = this.scanList.findIndex(item => {
|
|
|
+ return item.id == deviceInfo.id
|
|
|
+ })
|
|
|
+ if (c > -1) {
|
|
|
+ this.scanList.splice(c, 1)
|
|
|
+ uni.showToast({
|
|
|
+ title: "删除成功",
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ delOutList(item) {
|
|
|
+ var _this = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ //editable:true,
|
|
|
+ content: '确认是否删除',
|
|
|
+ success: function(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ _this.delOutListMethod(item)
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
getscan(val) {
|
|
|
console.log(val);
|
|
|
|
|
@@ -645,62 +645,62 @@
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
- API.queryDeviceByCode({
|
|
|
- code: val,
|
|
|
- }).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
- if (res.data.deviceInfo) {
|
|
|
- console.log(res.data.deviceInfo)
|
|
|
- this.nowscan=res.data.deviceInfo;
|
|
|
- var c = this.scanList.find(item => {
|
|
|
- return item.id == res.data.deviceInfo.id
|
|
|
- })
|
|
|
- if (c) {
|
|
|
- uni.showToast({
|
|
|
- title: "已存在,添加失败",
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.scanList.push(res.data.deviceInfo)
|
|
|
- uni.showToast({
|
|
|
- title: "添加成功",
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: "二维码无效",
|
|
|
- icon: "none"
|
|
|
+
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ API.queryDeviceByCode({
|
|
|
+ code: val,
|
|
|
+ }).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if (res.data.deviceInfo) {
|
|
|
+ console.log(res.data.deviceInfo)
|
|
|
+ this.nowscan=res.data.deviceInfo;
|
|
|
+ var c = this.scanList.find(item => {
|
|
|
+ return item.id == res.data.deviceInfo.id
|
|
|
+ })
|
|
|
+ if (c) {
|
|
|
+ uni.showToast({
|
|
|
+ title: "已存在,添加失败",
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.scanList.push(res.data.deviceInfo)
|
|
|
+ uni.showToast({
|
|
|
+ title: "添加成功",
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: "二维码无效",
|
|
|
+ icon: "none"
|
|
|
})
|
|
|
- this.nowscan={}
|
|
|
- }
|
|
|
-
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- getList() {
|
|
|
- uni.showLoading({
|
|
|
- title: "加载中",
|
|
|
- mask: true,
|
|
|
- })
|
|
|
- API.outRecordDeviceById({
|
|
|
- recordId: this.id,
|
|
|
- pageSize: this.listFrom.pageSize,
|
|
|
- pageIndex: this.listFrom.pageIndex,
|
|
|
- }).then((res) => {
|
|
|
- uni.hideLoading();
|
|
|
+ this.nowscan={}
|
|
|
+ }
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getList() {
|
|
|
+ uni.showLoading({
|
|
|
+ title: "加载中",
|
|
|
+ mask: true,
|
|
|
+ })
|
|
|
+ API.outRecordDeviceById({
|
|
|
+ recordId: this.id,
|
|
|
+ pageSize: this.listFrom.pageSize,
|
|
|
+ pageIndex: this.listFrom.pageIndex,
|
|
|
+ }).then((res) => {
|
|
|
+ uni.hideLoading();
|
|
|
|
|
|
if (this.listFrom.pageIndex == 1) {
|
|
|
this.list = res.data.data;
|
|
@@ -709,85 +709,85 @@
|
|
|
...this.list,
|
|
|
...res.data.data
|
|
|
];
|
|
|
- }
|
|
|
- this.recordsTotal = res.data.recordsTotal;
|
|
|
- }).catch(error => {
|
|
|
- uni.showToast({
|
|
|
- title: error,
|
|
|
- icon: "none"
|
|
|
- })
|
|
|
- })
|
|
|
- },
|
|
|
- myLoadmore() {
|
|
|
- this.listFrom.pageIndex += 1;
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- changeShow(item) {
|
|
|
- console.log(item.show)
|
|
|
- console.log(item)
|
|
|
- if (item.show) {
|
|
|
- item.show = false;
|
|
|
- } else {
|
|
|
- item.show = true;
|
|
|
- }
|
|
|
- this.$forceUpdate()
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped lang="scss">
|
|
|
- .bottom {
|
|
|
- background-color: #fff;
|
|
|
- margin-top: 44rpx;
|
|
|
- padding: 16rpx 32rpx;
|
|
|
- z-index: 999;
|
|
|
- position: fixed;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
- // uni-button{
|
|
|
- // border-radius: 8px;
|
|
|
- // background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(16,98,213,1) 100%);
|
|
|
- // color: rgba(255, 255, 255, 1);
|
|
|
- // font-size: 32rpx;
|
|
|
- // line-height: 88rpx;
|
|
|
-
|
|
|
- // }
|
|
|
- }
|
|
|
-
|
|
|
- page {
|
|
|
- padding-bottom: 100px;
|
|
|
- }
|
|
|
-
|
|
|
- .u-navbar {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- font-size: 36rpx;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- flex: 1;
|
|
|
- position: absolute;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- height: 60rpx;
|
|
|
- text-align: center;
|
|
|
- flex-shrink: 0;
|
|
|
- left: 237rpx;
|
|
|
- right: 107rpx;
|
|
|
- width: 300rpx;
|
|
|
-
|
|
|
- .title {
|
|
|
-
|
|
|
-
|
|
|
- line-height: 60rpx;
|
|
|
- font-size: 36rpx;
|
|
|
- flex: 1;
|
|
|
-
|
|
|
- text {
|
|
|
- color: #2A8EFB
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ this.recordsTotal = res.data.recordsTotal;
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ myLoadmore() {
|
|
|
+ this.listFrom.pageIndex += 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ changeShow(item) {
|
|
|
+ console.log(item.show)
|
|
|
+ console.log(item)
|
|
|
+ if (item.show) {
|
|
|
+ item.show = false;
|
|
|
+ } else {
|
|
|
+ item.show = true;
|
|
|
+ }
|
|
|
+ this.$forceUpdate()
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+ .bottom {
|
|
|
+ background-color: #fff;
|
|
|
+ margin-top: 44rpx;
|
|
|
+ padding: 16rpx 32rpx;
|
|
|
+ z-index: 999;
|
|
|
+ position: fixed;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ // uni-button{
|
|
|
+ // border-radius: 8px;
|
|
|
+ // background: linear-gradient(180deg, rgba(22,119,255,1) 0%,rgba(16,98,213,1) 100%);
|
|
|
+ // color: rgba(255, 255, 255, 1);
|
|
|
+ // font-size: 32rpx;
|
|
|
+ // line-height: 88rpx;
|
|
|
+
|
|
|
+ // }
|
|
|
+ }
|
|
|
+
|
|
|
+ page {
|
|
|
+ padding-bottom: 100px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .u-navbar {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ font-size: 36rpx;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ flex: 1;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ height: 60rpx;
|
|
|
+ text-align: center;
|
|
|
+ flex-shrink: 0;
|
|
|
+ left: 237rpx;
|
|
|
+ right: 107rpx;
|
|
|
+ width: 300rpx;
|
|
|
+
|
|
|
+ .title {
|
|
|
+
|
|
|
+
|
|
|
+ line-height: 60rpx;
|
|
|
+ font-size: 36rpx;
|
|
|
+ flex: 1;
|
|
|
+
|
|
|
+ text {
|
|
|
+ color: #2A8EFB
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.details {
|
|
|
background-color: #fff;
|
|
@@ -816,7 +816,7 @@
|
|
|
color: #3385FF;
|
|
|
}
|
|
|
|
|
|
- /deep/.u-icon--right {
|
|
|
+ ::v-deep .u-icon--right {
|
|
|
margin-left: 8rpx;
|
|
|
}
|
|
|
}
|
|
@@ -883,7 +883,7 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
.scantitle{
|
|
|
text-align: center;
|
|
|
font-size: 44rpx;
|
|
@@ -896,147 +896,147 @@
|
|
|
.listHead{
|
|
|
|
|
|
padding-bottom: 60px;
|
|
|
- }
|
|
|
- .list {
|
|
|
- background-color: #fff;
|
|
|
- margin: 24rpx;
|
|
|
- padding: 22rpx 32rpx;
|
|
|
-
|
|
|
- // 清单信息
|
|
|
- .list-infos {
|
|
|
- border-radius: 8px;
|
|
|
-
|
|
|
- .infos-head {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 24rpx;
|
|
|
-
|
|
|
- .name {
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
- font-size: 32rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .qr-code {
|
|
|
- border-radius: 4px;
|
|
|
- background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(16, 98, 213, 1) 100%);
|
|
|
- color: rgba(255, 255, 255, 1);
|
|
|
- font-size: 24rpx;
|
|
|
- width: 160rpx;
|
|
|
- text-align: center;
|
|
|
- line-height: 64rpx;
|
|
|
-
|
|
|
- text {
|
|
|
- img {
|
|
|
- vertical-align: middle;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .infos {
|
|
|
- margin-top: 16rpx;
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- color: #777777;
|
|
|
- font-size: 24rpx;
|
|
|
-
|
|
|
- .infos-1 {
|
|
|
- margin-right: 68rpx;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- .infos-item {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
+ }
|
|
|
+ .list {
|
|
|
+ background-color: #fff;
|
|
|
+ margin: 24rpx;
|
|
|
+ padding: 22rpx 32rpx;
|
|
|
+
|
|
|
+ // 清单信息
|
|
|
+ .list-infos {
|
|
|
+ border-radius: 8px;
|
|
|
+
|
|
|
+ .infos-head {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+
|
|
|
+ .name {
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ font-size: 32rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .qr-code {
|
|
|
+ border-radius: 4px;
|
|
|
+ background: linear-gradient(180deg, rgba(22, 119, 255, 1) 0%, rgba(16, 98, 213, 1) 100%);
|
|
|
+ color: rgba(255, 255, 255, 1);
|
|
|
+ font-size: 24rpx;
|
|
|
+ width: 160rpx;
|
|
|
+ text-align: center;
|
|
|
+ line-height: 64rpx;
|
|
|
+
|
|
|
+ text {
|
|
|
+ img {
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .infos {
|
|
|
+ margin-top: 16rpx;
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ color: #777777;
|
|
|
+ font-size: 24rpx;
|
|
|
+
|
|
|
+ .infos-1 {
|
|
|
+ margin-right: 68rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ .infos-item {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
margin-bottom: 8rpx;
|
|
|
.item-value{
|
|
|
max-width: 200rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .address,
|
|
|
- .remark {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- color: #777777;
|
|
|
- font-size: 24rpx;
|
|
|
- margin-bottom: 8rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .prepare-out {
|
|
|
- padding: 24rpx;
|
|
|
- margin-top: 40rpx;
|
|
|
- border-radius: 8px;
|
|
|
- background-color: rgba(245, 246, 249, 1);
|
|
|
-
|
|
|
- .head {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-bottom: 24rpx;
|
|
|
-
|
|
|
- .amount {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- color: rgba(0, 81, 255, 1);
|
|
|
- font-size: 32rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .unfold {
|
|
|
- color: rgba(146, 158, 165, 1);
|
|
|
- font-size: 24rpx;
|
|
|
- position: relative;
|
|
|
-
|
|
|
- .u-icon--right {
|
|
|
- margin-left: 8rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .option {
|
|
|
- width: 160rpx;
|
|
|
- height: 32rpx;
|
|
|
- background-color: #fff;
|
|
|
- position: absolute;
|
|
|
- top: 30rpx;
|
|
|
- right: 0;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- // 编号
|
|
|
- .serial-number {
|
|
|
- display: flex;flex-wrap: wrap;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
- margin-top: 16rpx;
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
- font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ .address,
|
|
|
+ .remark {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ color: #777777;
|
|
|
+ font-size: 24rpx;
|
|
|
+ margin-bottom: 8rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .prepare-out {
|
|
|
+ padding: 24rpx;
|
|
|
+ margin-top: 40rpx;
|
|
|
+ border-radius: 8px;
|
|
|
+ background-color: rgba(245, 246, 249, 1);
|
|
|
+
|
|
|
+ .head {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: 24rpx;
|
|
|
+
|
|
|
+ .amount {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ color: rgba(0, 81, 255, 1);
|
|
|
+ font-size: 32rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .unfold {
|
|
|
+ color: rgba(146, 158, 165, 1);
|
|
|
+ font-size: 24rpx;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ .u-icon--right {
|
|
|
+ margin-left: 8rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .option {
|
|
|
+ width: 160rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ background-color: #fff;
|
|
|
+ position: absolute;
|
|
|
+ top: 30rpx;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 编号
|
|
|
+ .serial-number {
|
|
|
+ display: flex;flex-wrap: wrap;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 16rpx;
|
|
|
+ color: rgba(51, 51, 51, 1);
|
|
|
+ font-weight: bold;
|
|
|
.itemLine{
|
|
|
width: 100%;
|
|
|
.view {
|
|
|
float: right;
|
|
|
color: #0051ff;
|
|
|
}
|
|
|
- }
|
|
|
- .item {
|
|
|
+ }
|
|
|
+ .item {
|
|
|
display: flex;flex-wrap: wrap;
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- // 备注
|
|
|
- .textarea {
|
|
|
- width: 100%;
|
|
|
- height: 80rpx;
|
|
|
- line-height: 80rpx;
|
|
|
- text-indent: 24rpx;
|
|
|
- margin-top: 24rpx;
|
|
|
- background-color: rgba(241, 242, 245, 1);
|
|
|
- color: rgba(136, 136, 136, 1);
|
|
|
- border-radius: 8px;
|
|
|
- font-family: Microsoft Yahei;
|
|
|
- font-size: 28rpx;
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ // 备注
|
|
|
+ .textarea {
|
|
|
+ width: 100%;
|
|
|
+ height: 80rpx;
|
|
|
+ line-height: 80rpx;
|
|
|
+ text-indent: 24rpx;
|
|
|
+ margin-top: 24rpx;
|
|
|
+ background-color: rgba(241, 242, 245, 1);
|
|
|
+ color: rgba(136, 136, 136, 1);
|
|
|
+ border-radius: 8px;
|
|
|
+ font-family: Microsoft Yahei;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
</style>
|