连续扫码优化
This commit is contained in:
87
components/LinkScan.vue
Normal file
87
components/LinkScan.vue
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<template>
|
||||||
|
<view class="search_wraper">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
class="filter_input pdr120"
|
||||||
|
confirm-type="go"
|
||||||
|
:value="value"
|
||||||
|
:focus="focusState"
|
||||||
|
@focus="handleFocus"
|
||||||
|
@blur="handleBlur"
|
||||||
|
@confirm="handleSend">
|
||||||
|
<view class="filter_num">{{editValue.toString()}}</view>
|
||||||
|
<view class="zd-row buttons_wraper">
|
||||||
|
<uni-icons v-show="editValue.length > 0" class="pdr10" type="clear" size="24" color="#666" @tap="linkDel"></uni-icons>
|
||||||
|
<uni-icons v-show="value !== '' && value !== null && value !== undefined" class="pdr10" type="clear" size="24" color="#666" @tap="toDel"></uni-icons>
|
||||||
|
<uni-icons type="scan" size="22" :color="focusState ? '#ff6a00' : '#4e6ef2'" @tap="focusState=true"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import permision from "@/utils/permission.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
focusState: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
model: {
|
||||||
|
prop: 'value',
|
||||||
|
event: 'input'
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
value: String,
|
||||||
|
editValue: Array
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleFocus () {
|
||||||
|
this.focusState = true
|
||||||
|
},
|
||||||
|
handleBlur (e) {
|
||||||
|
this.$emit('input', e.target.value)
|
||||||
|
// if (e.target.value.length) {
|
||||||
|
// this.$emit('handleChange', e.target.value)
|
||||||
|
// }
|
||||||
|
this.focusState = false
|
||||||
|
},
|
||||||
|
toDel () {
|
||||||
|
this.$emit('input', '')
|
||||||
|
this.$emit('handleDel')
|
||||||
|
},
|
||||||
|
linkDel () {
|
||||||
|
this.$emit('linkDel')
|
||||||
|
},
|
||||||
|
handleSend (e) {
|
||||||
|
this.$emit('input', e.target.value)
|
||||||
|
if (e.target.value.length) {
|
||||||
|
this.$emit('handleChange', e.target.value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus" scoped>
|
||||||
|
@import '../common/style/mixin.styl';
|
||||||
|
.search_wraper
|
||||||
|
position relative
|
||||||
|
_wh(100%, 80rpx)
|
||||||
|
.pdr120
|
||||||
|
padding-right: 50%;
|
||||||
|
.buttons_wraper
|
||||||
|
position absolute
|
||||||
|
top 0
|
||||||
|
right 10rpx
|
||||||
|
_wh(auto, 80rpx)
|
||||||
|
.pdr10
|
||||||
|
padding-right 10rpx
|
||||||
|
.filter_num
|
||||||
|
position absolute
|
||||||
|
top 0
|
||||||
|
right 50px
|
||||||
|
width calc(50% - 50px)
|
||||||
|
overflow hidden
|
||||||
|
text-overflow ellipsis
|
||||||
|
line-height 80rpx
|
||||||
|
</style>
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
<span class="filter_label">出库单据编号</span>
|
<span class="filter_label">出库单据编号</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-16 zd-row relative">
|
<view class="zd-col-16 zd-row relative">
|
||||||
<view class="filter_num">{{editValue.toString()}}</view>
|
<link-scan
|
||||||
<search-box
|
:editValue="editValue"
|
||||||
v-model="val2"
|
v-model="val2"
|
||||||
@handleChange="handleChange2"
|
@handleChange="handleChange2"
|
||||||
|
@linkDel="toDel"
|
||||||
/>
|
/>
|
||||||
<uni-icons v-show="editValue.length > 0" class="absolute del-icon" type="clear" size="24" color="#666" @tap="toDel"></uni-icons>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -91,11 +91,13 @@
|
|||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import LinkScan from '@/components/LinkScan.vue'
|
||||||
import {queryTargetPoint, getCtuOrderList, ctuOutConfirm} from '@/utils/getData2.js'
|
import {queryTargetPoint, getCtuOrderList, ctuOutConfirm} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox
|
SearchBox,
|
||||||
|
LinkScan
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -177,8 +177,8 @@
|
|||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
let data = Object.assign({}, this.data, {lxCode: this.val2})
|
// let data = Object.assign({}, this.data, {lxCode: this.val2})
|
||||||
setTimeout(this.toPrint(data), 800)
|
// setTimeout(this.toPrint(data), 800)
|
||||||
this.clearUp()
|
this.clearUp()
|
||||||
} else {
|
} else {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ export const structattrPage = () => {
|
|||||||
export const getCtuOrderList = () => {
|
export const getCtuOrderList = () => {
|
||||||
let res = {
|
let res = {
|
||||||
"code": "200",
|
"code": "200",
|
||||||
data: '3',
|
data: 'JDSCLLSQ250500293',
|
||||||
content: [{material_name: '1', status: '1'}, {material_name: '2', status: '1'}, {material_name: '3', status: '1'}, {material_name: '4', status: '1'}, {material_name: '5', status: '1'}, {material_name: '6', status: '1'}, {material_name: '7', status: '1'}, {material_name: '8', status: '1'}, {material_name: '9', status: '0'}, {material_name: '10', status: '1'}]
|
content: [{material_name: '1', status: '1'}, {material_name: '2', status: '1'}, {material_name: '3', status: '1'}, {material_name: '4', status: '1'}, {material_name: '5', status: '1'}, {material_name: '6', status: '1'}, {material_name: '7', status: '1'}, {material_name: '8', status: '1'}, {material_name: '9', status: '0'}, {material_name: '10', status: '1'}]
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|||||||
Reference in New Issue
Block a user