Browse Source

扫描叫料添加优先级

hella_online_20240829
lijuncheng 4 months ago
parent
commit
0f33a08905
  1. 159
      src/mycomponents/scan/winScanPackLevel.vue
  2. 9
      src/pages/issue/request/issueScanRequest.vue

159
src/mycomponents/scan/winScanPackLevel.vue

@ -0,0 +1,159 @@
<template>
<view>
<uni-popup ref="popup" :mask-click="false">
<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="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
border-radius: 8rpx;
">
<view class="uni-center" style="width: 25%; font-size: 32rpx; font-weight: bold;">
优先级
</view>
<view style="width: 100%;">
<uni-data-select style="padding: 20rpx;" v-model="levelCode" :localdata="levelList" @change="change"
:clear="false"></uni-data-select>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult"
:headerType="headerType" :isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage" @afterClose="getfocus"></comMessage>
</view>
</template>
<script>
import {
getLabelInfo
} from '@/common/label.js';
import winComScan from '@/mycomponents/scan/winComScan.vue'
export default {
components: {
winComScan,
},
props: {
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: 'HPQ'
}
},
data() {
return {
show: false,
levelList: [{
value: 0,
text: "高"
},
{
value: 1,
text: "中"
},
{
value: 2,
text: "低"
},
],
levelCode: 1
}
},
created() {
},
methods: {
simulateScan(scanMessage) {
getLabelInfo(scanMessage, this.headerType, callback => {
if (callback.success) {
this.getScanResult(callback);
} else {
this.showMessage(callback.message)
}
})
},
openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 200)
},
closeScanPopup() {
this.$refs.popup.close();
this.$emit("close", '');
},
scanClick() {
if (this.$refs.comscan) {
this.$refs.comscan.clickScanMsg();
}
},
cancelClick() {
if (this.$refs.comscan) {
this.$refs.comscan.clearScanValue();
}
},
getScanResult(result) {
if (result.success) {
result.levelCode =this.levelCode
this.$emit("getResult", result);
} else {
this.showMessage(result.message)
}
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
change(e) {
console.log(e);
},
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

9
src/pages/issue/request/issueScanRequest.vue

@ -4,7 +4,7 @@
<com-blank-view @goScan='goScan()'></com-blank-view>
</view>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HCMQ" title="叫料标签" :isShowHistory="false"></win-scan-pack>
<winScanPackLevel ref="scanPopup" @getResult='getScanResult' headerType="HCMQ" title="叫料标签" :isShowHistory="false"></winScanPackLevel>
<comMessage ref="comMessage"></comMessage>
</template>
@ -37,7 +37,7 @@
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackLevel from '@/mycomponents/scan/winScanPackLevel.vue'
export default {
name: 'issueRequestSubmit',
@ -46,7 +46,7 @@
jobDetailPopup,
comScanIssuePack,
comIssueRequestCreator,
winScanPack
winScanPackLevel
},
data() {
return {
@ -104,7 +104,8 @@
location:labelInfo.location,
qty:labelInfo.qty,
uom:labelInfo.uom,
packUnit:labelInfo.packUnit
packUnit:labelInfo.packUnit,
levelCode:data.levelCode
};
this.detailSource.subList.push(data)

Loading…
Cancel
Save