niexiting
6 months ago
11 changed files with 3566 additions and 3062 deletions
@ -0,0 +1,68 @@ |
|||
<template> |
|||
<view class="wyf"> |
|||
<uni-popup ref="listPopup" type="dialog"> |
|||
<view class="container"> |
|||
<uni-list class="list"> |
|||
<uni-list-item v-for="(item,index) in list" :title="item.title" |
|||
thumb-size="lg" > |
|||
<template v-slot:footer> |
|||
<!-- <image class="slot-image" src="@/static/logo.png" mode="widthFix" @click="selectItem(item,index)"></image --> |
|||
<text class="go" @click="selectItem(item,index)">Go</text> |
|||
</template> |
|||
|
|||
</uni-list-item> |
|||
|
|||
</uni-list> |
|||
</view> |
|||
</uni-popup> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
import { onShow } from '@dcloudio/uni-app'; |
|||
export default { |
|||
emits: ["selectItem"], |
|||
components: { |
|||
}, |
|||
data() { |
|||
return { |
|||
list: [] |
|||
// [{ |
|||
// title:'哈哈哈哈', |
|||
// selected:false |
|||
// }], |
|||
} |
|||
}, |
|||
props: { |
|||
}, |
|||
methods:{ |
|||
openList(list){ |
|||
this.list = list |
|||
this.$refs.listPopup.open('center') |
|||
}, |
|||
selectItem(item,index){ |
|||
this.$emit("selectItem", item); |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
.container{ |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
.list{ |
|||
width: 80%; |
|||
border-radius: 10px !important; |
|||
overflow: hidden; |
|||
.slot-image{ |
|||
width: 40rpx; |
|||
} |
|||
.go{ |
|||
color: rgb(60, 156, 255); |
|||
} |
|||
} |
|||
|
|||
} |
|||
</style> |
@ -0,0 +1,128 @@ |
|||
<template> |
|||
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()"> |
|||
<view class="popup_box"> |
|||
<view class="pop_title uni-flex space-between"> |
|||
<view class="" style="font-size: 35rpx;"> |
|||
扫描{{title}} |
|||
</view> |
|||
|
|||
<view class=""> |
|||
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" |
|||
@click="closeScanPopup()"></image> |
|||
</view> |
|||
</view> |
|||
<view class=""> |
|||
<view class=""> |
|||
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" |
|||
:isShowHistory="isShowHistory" :clearResult="true" :headerType="headerType"></win-com-scan> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</uni-popup> |
|||
<comMessage ref="comMessage"></comMessage> |
|||
</template> |
|||
|
|||
<script> |
|||
import winComScan from '@/mycomponents/scan/winComScan.vue' |
|||
import { |
|||
getBalanceByManagementPrecision, |
|||
} from '@/common/balance.js'; |
|||
|
|||
import { |
|||
getBasicLocationByCode, |
|||
getPutawayJobList |
|||
} from '@/api/request2.js'; |
|||
|
|||
import { |
|||
getListLocationTypeDesc, |
|||
checkDirectoryItemExist, |
|||
getDirectoryItemArray, |
|||
getLocationTypeName, |
|||
getInventoryStatusDesc |
|||
} from '@/common/directory.js'; |
|||
export default { |
|||
name: 'winScanPack', |
|||
emits: ["getResult", "close", "getCountScanResult"], |
|||
components: { |
|||
winComScan |
|||
}, |
|||
props: { |
|||
title: { |
|||
type: String, |
|||
default: '箱标签' |
|||
}, |
|||
isShowHistory: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
headerType: { |
|||
type: String, |
|||
default: "HPQ,HMQ" |
|||
}, |
|||
}, |
|||
data() { |
|||
return { |
|||
show: false, |
|||
} |
|||
}, |
|||
created() { |
|||
|
|||
}, |
|||
methods: { |
|||
// 弹出 |
|||
openScanPopup(){ |
|||
|
|||
this.$refs.popup.open('bottom') |
|||
}, |
|||
// 关闭 |
|||
closeScanPopup(content) { |
|||
this.$refs.popup.close(); |
|||
this.$emit("close", ''); |
|||
}, |
|||
//扫描结果 |
|||
getScanResult(result) { |
|||
this.$emit("getResult", result); |
|||
}, |
|||
packGetFocus() { |
|||
if (this.$refs.comscan != undefined) { |
|||
this.$refs.comscan.getfocus(); |
|||
} |
|||
}, |
|||
|
|||
packLoseFocus() { |
|||
if (this.$refs.comscan != undefined) { |
|||
this.$refs.comscan.losefocus(); |
|||
} |
|||
}, |
|||
showMessage(message, callback) { |
|||
setTimeout(r => { |
|||
this.packLoseFocus(); |
|||
this.$refs.comMessage.showMessage(message, callback); |
|||
}) |
|||
}, |
|||
|
|||
showErrorMessage(message, callback) { |
|||
setTimeout(r => { |
|||
this.packLoseFocus(); |
|||
this.$refs.comMessage.showErrorMessage(message, callback) |
|||
}) |
|||
}, |
|||
|
|||
change(e) { |
|||
this.show = e.show |
|||
}, |
|||
selectItem(item,index){ |
|||
|
|||
|
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
.scroll-view { |
|||
overflow-y: scroll; |
|||
height: auto; |
|||
max-height: 300rpx; |
|||
} |
|||
</style> |
Loading…
Reference in new issue