|
@ -1,53 +1,59 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class=""> |
|
|
<view class=""> |
|
|
<u-popup v-model="showOne" mode="bottom" border-radius="14" z-index='12'> |
|
|
<u-popup v-model="showOne" mode="bottom" border-radius="14" z-index='12'> |
|
|
<view class="title"> |
|
|
<view class="title"> |
|
|
<view class="title-txt"> |
|
|
<view class="title-txt"> |
|
|
需求信息 |
|
|
需求信息 |
|
|
</view> |
|
|
</view> |
|
|
<u-icon name="close" color="#4f4f4f" size="28" @click="showOne = false"></u-icon> |
|
|
<u-icon name="close" color="#4f4f4f" size="28" @click="showOne = false"></u-icon> |
|
|
</view> |
|
|
</view> |
|
|
<view class="item"> |
|
|
<view class="item"> |
|
|
<view class="label">来源库位:</view> |
|
|
<view class="label">来源库位:</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<u-input v-model="fromLocationCode"></u-input> |
|
|
<u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg" @blur="fromLocationScanMsg" |
|
|
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="fromLocationCode=''" v-if="fromLocationCode"></u-icon> |
|
|
|
|
|
|
|
|
></u-input> |
|
|
|
|
|
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="fromLocationCode=''" |
|
|
|
|
|
v-if="fromLocationCode"></u-icon> |
|
|
</view> |
|
|
</view> |
|
|
<view class="searchIcon"> |
|
|
<view class="searchIcon"> |
|
|
<image src="/static/search.svg" mode="" @click="fromLocationClick"/> |
|
|
<image src="/static/search.svg" mode="" @click="fromLocationClick" /> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="item"> |
|
|
<view class="item"> |
|
|
<view class="label">零件:</view> |
|
|
<view class="label">零件:</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<u-input v-model="itemCode"></u-input> |
|
|
<u-input v-model="itemCode" @confirm="itemCodeScanMsg" @blur="itemCodeScanMsg"></u-input> |
|
|
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="itemCode=''" v-if="itemCode"></u-icon> |
|
|
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="itemCode=''" |
|
|
|
|
|
v-if="itemCode"></u-icon> |
|
|
</view> |
|
|
</view> |
|
|
<view class="searchIcon"> |
|
|
<view class="searchIcon"> |
|
|
<image src="/static/search.svg" mode="" @click="itemCodeClick"/> |
|
|
<image src="/static/search.svg" mode="" @click="itemCodeClick" /> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="item"> |
|
|
<view class="item"> |
|
|
<view class="label">批次:</view> |
|
|
<view class="label">批次:</view> |
|
|
<view class="value"> |
|
|
<view class="value"> |
|
|
<u-input v-model='batch'></u-input> |
|
|
<u-input v-model='batch'></u-input> |
|
|
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="batch = ''" v-if="batch"></u-icon> |
|
|
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="batch = ''" |
|
|
|
|
|
v-if="batch"></u-icon> |
|
|
</view> |
|
|
</view> |
|
|
<view class="searchIcon"></view> |
|
|
<view class="searchIcon"></view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="item"> |
|
|
<view class="item"> |
|
|
<view class="label">数量:</view> |
|
|
<view class="label">数量:</view> |
|
|
<view class="value1"> |
|
|
<view class="value1"> |
|
|
<u-number-box v-model="handleQty" ></u-number-box> |
|
|
<u-number-box v-model="handleQty"></u-number-box> |
|
|
<uom :uom="uom"></uom> |
|
|
<uom :uom="uom"></uom> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex uni-row hide_border"> |
|
|
<view class="uni-flex uni-row hide_border"> |
|
|
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" @click="showOne = false">取消</button> |
|
|
<button class="btn_edit_big_cancle" hover-class="btn_edit_big_after" |
|
|
|
|
|
@click="showOne = false">取消</button> |
|
|
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|
|
<button class="btn_edit_big_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</button> |
|
|
</view> |
|
|
</view> |
|
|
</u-popup> |
|
|
</u-popup> |
|
|
|
|
|
|
|
|
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation' |
|
|
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation' |
|
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> --> |
|
|
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> --> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
@ -59,30 +65,36 @@ |
|
|
import { |
|
|
import { |
|
|
getBusinessType |
|
|
getBusinessType |
|
|
} from '@/common/record.js'; |
|
|
} from '@/common/record.js'; |
|
|
|
|
|
|
|
|
import { |
|
|
import { |
|
|
getLabelInfo |
|
|
getLabelInfo |
|
|
} from '../../../common/label.js'; |
|
|
} from '../../../common/label.js'; |
|
|
|
|
|
|
|
|
import uom from '@/mycomponents/qty/uom.vue' |
|
|
import { |
|
|
|
|
|
getBasicLocationByCode, |
|
|
|
|
|
} from '@/api/request2.js'; |
|
|
|
|
|
|
|
|
|
|
|
import uom from '@/mycomponents/qty/uom.vue' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: { |
|
|
components: { |
|
|
winScanLocation, |
|
|
winScanLocation, |
|
|
uom |
|
|
uom |
|
|
}, |
|
|
}, |
|
|
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'], |
|
|
emits: ["showFromLocationPopup", 'itemCodeClick', 'confirm', 'getInputMsgResult', 'clearFromLocationCode', |
|
|
|
|
|
'clickBtnClearItemCode' |
|
|
|
|
|
], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
handleQty:0, |
|
|
handleQty: 0, |
|
|
fromLocationCode:'', |
|
|
fromLocationCode: '', |
|
|
itemCode:'', |
|
|
itemCode: '', |
|
|
batch:'', |
|
|
batch: '', |
|
|
showOne:false, |
|
|
showOne: false, |
|
|
isFromLocationFocus:false, |
|
|
isFromLocationFocus: false, |
|
|
uom:"" |
|
|
uom: "" |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
@ -92,33 +104,32 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
default: false |
|
|
default: false |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() {}, |
|
|
}, |
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
// 打开扫描来源库位组件 |
|
|
// 打开扫描来源库位组件 |
|
|
fromLocationClick(){ |
|
|
fromLocationClick() { |
|
|
// this.$refs.scanLocationCode.openScanPopup() |
|
|
// this.$refs.scanLocationCode.openScanPopup() |
|
|
this.$emit("showFromLocationPopup"); |
|
|
this.$emit("showFromLocationPopup"); |
|
|
}, |
|
|
}, |
|
|
// 显示箱码 |
|
|
// 显示箱码 |
|
|
itemCodeClick(){ |
|
|
itemCodeClick() { |
|
|
// this.$refs.scanLocationCode.openScanPopup() |
|
|
// this.$refs.scanLocationCode.openScanPopup() |
|
|
if(!this.fromLocationCode){ |
|
|
if (!this.fromLocationCode) { |
|
|
this.$refs.comMessage.showMessage("请先扫描来源库位") |
|
|
this.$refs.comMessage.showMessage("请先扫描来源库位") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
this.$emit("itemCodeClick"); |
|
|
this.$emit("itemCodeClick"); |
|
|
}, |
|
|
}, |
|
|
confirm(){ |
|
|
confirm() { |
|
|
// this.$refs.scanLocationCode.openScanPopup() |
|
|
// this.$refs.scanLocationCode.openScanPopup() |
|
|
|
|
|
|
|
|
let obj = { |
|
|
let obj = { |
|
|
fromLocationCode:this.fromLocationCode, |
|
|
fromLocationCode: this.fromLocationCode, |
|
|
itemCode:this.itemCode, |
|
|
itemCode: this.itemCode, |
|
|
batch:this.batch, |
|
|
batch: this.batch, |
|
|
handleQty:this.handleQty, |
|
|
handleQty: this.handleQty, |
|
|
} |
|
|
} |
|
|
this.$emit("confirm",obj); |
|
|
this.$emit("confirm", obj); |
|
|
// if(!obj.fromLocationCode){ |
|
|
// if(!obj.fromLocationCode){ |
|
|
// this.$refs.comMessage.showErrorMessage('请选择来源库位'); |
|
|
// this.$refs.comMessage.showErrorMessage('请选择来源库位'); |
|
|
// return; |
|
|
// return; |
|
@ -131,26 +142,32 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
// this.$refs.comMessage.showErrorMessage('请输入数量'); |
|
|
// this.$refs.comMessage.showErrorMessage('请输入数量'); |
|
|
// return; |
|
|
// return; |
|
|
// } |
|
|
// } |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
fromLocationScanMsg(){ |
|
|
fromLocationScanMsg() { |
|
|
if (this.fromLocationCode) { |
|
|
setTimeout(() => { |
|
|
this.scanMsg = this.fromLocationCode |
|
|
if (this.fromLocationCode) { |
|
|
this.fromWitch = 'fromLocationScanMsg' |
|
|
this.scanMsg = this.fromLocationCode |
|
|
this.isFromLocationFocus = false |
|
|
this.fromWitch = 'fromLocationScanMsg' |
|
|
this.handelScanMsg() |
|
|
this.isFromLocationFocus = false |
|
|
} |
|
|
this.handelScanMsg() |
|
|
|
|
|
} |
|
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
itemCodeScanMsg(){ |
|
|
itemCodeScanMsg() { |
|
|
if (this.itemCode) { |
|
|
setTimeout(() => { |
|
|
if(!this.fromLocationCode){ |
|
|
if (this.itemCode) { |
|
|
this.$refs.comMessage.showMessage("请先扫描来源库位") |
|
|
if (!this.fromLocationCode) { |
|
|
return |
|
|
this.$refs.comMessage.showMessage("请先扫描来源库位") |
|
|
} |
|
|
return |
|
|
this.fromWitch = 'itemCodeScanMsg' |
|
|
} |
|
|
this.scanMsg = this.itemCode |
|
|
this.fromWitch = 'itemCodeScan' |
|
|
this.handelScanMsg() |
|
|
this.scanMsg = this.itemCode |
|
|
} |
|
|
this.handelScanMsg() |
|
|
|
|
|
} |
|
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
handelScanMsg() { |
|
|
handelScanMsg() { |
|
|
//点击了回车 |
|
|
//点击了回车 |
|
@ -159,7 +176,7 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
// mask: true |
|
|
// mask: true |
|
|
// }) |
|
|
// }) |
|
|
let that = this; |
|
|
let that = this; |
|
|
console.log(777,that.scanMsg) |
|
|
console.log(777, that.scanMsg) |
|
|
// if(index==-1){ |
|
|
// if(index==-1){ |
|
|
// that.scanMsg =that.scanMsg + "\n"; |
|
|
// that.scanMsg =that.scanMsg + "\n"; |
|
|
// } |
|
|
// } |
|
@ -179,11 +196,11 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
}) |
|
|
}) |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (that.isShowHistory) { |
|
|
if (that.isShowHistory) { |
|
|
that.scanList.unshift(content); |
|
|
that.scanList.unshift(content); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getLabelInfo(content, this.headerType, callback => { |
|
|
getLabelInfo(content, this.headerType, callback => { |
|
|
// uni.hideLoading(); |
|
|
// uni.hideLoading(); |
|
|
let scanResult = callback; |
|
|
let scanResult = callback; |
|
@ -191,7 +208,7 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
if (scanResult.success) { |
|
|
if (scanResult.success) { |
|
|
// that.getfocus();//不能自动获取焦点 |
|
|
// that.getfocus();//不能自动获取焦点 |
|
|
console.log(scanResult) |
|
|
console.log(scanResult) |
|
|
that.$emit("getInputMsgResult", scanResult,this.fromWitch); |
|
|
that.$emit("getInputMsgResult", scanResult, this.fromWitch); |
|
|
} else { |
|
|
} else { |
|
|
that.losefocus(); |
|
|
that.losefocus(); |
|
|
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { |
|
|
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { |
|
@ -210,50 +227,56 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
that.boxfocus = false; |
|
|
that.boxfocus = false; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
clickBtnClearFromLocation(){ |
|
|
clickBtnClearFromLocation() { |
|
|
this.$emit("clickBtnClearFromLocation"); |
|
|
this.$emit("clickBtnClearFromLocation"); |
|
|
}, |
|
|
}, |
|
|
clickBtnClearItemCode(){ |
|
|
clickBtnClearItemCode() { |
|
|
this.$emit("clickBtnClearItemCode"); |
|
|
this.$emit("clickBtnClearItemCode"); |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
<style lang="scss"> |
|
|
.title{ |
|
|
.title { |
|
|
padding:30rpx 20rpx; |
|
|
padding: 30rpx 20rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
border-bottom:1px solid rgba(230, 230, 230, 1); |
|
|
border-bottom: 1px solid rgba(230, 230, 230, 1); |
|
|
.title-txt{ |
|
|
|
|
|
flex:1; |
|
|
.title-txt { |
|
|
|
|
|
flex: 1; |
|
|
font-weight: bold; |
|
|
font-weight: bold; |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
.select{ |
|
|
|
|
|
|
|
|
.select { |
|
|
display: flex; |
|
|
display: flex; |
|
|
} |
|
|
} |
|
|
.border{ |
|
|
|
|
|
border:1px solid rgba(230, 230, 230, 1) |
|
|
.border { |
|
|
|
|
|
border: 1px solid rgba(230, 230, 230, 1) |
|
|
} |
|
|
} |
|
|
::v-deep .u-input__right-icon__clear{ |
|
|
|
|
|
|
|
|
::v-deep .u-input__right-icon__clear { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
color: #a7a7a7; |
|
|
color: #a7a7a7; |
|
|
} |
|
|
} |
|
|
.item{ |
|
|
|
|
|
|
|
|
.item { |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
padding: 20rpx; |
|
|
padding: 20rpx; |
|
|
border-bottom: 1px solid #dedede; |
|
|
border-bottom: 1px solid #dedede; |
|
|
.value{ |
|
|
|
|
|
flex:1; |
|
|
.value { |
|
|
|
|
|
flex: 1; |
|
|
width: 0px; |
|
|
width: 0px; |
|
|
height: 80rpx; |
|
|
height: 80rpx; |
|
|
border: 1px solid #dedede; |
|
|
border: 1px solid #dedede; |
|
@ -262,25 +285,29 @@ import uom from '@/mycomponents/qty/uom.vue' |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
padding: 0px 20rpx; |
|
|
padding: 0px 20rpx; |
|
|
} |
|
|
} |
|
|
.value1{ |
|
|
|
|
|
flex:1; |
|
|
.value1 { |
|
|
|
|
|
flex: 1; |
|
|
width: 0px; |
|
|
width: 0px; |
|
|
height: 80rpx; |
|
|
height: 80rpx; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
font-size: 32rpx; |
|
|
font-size: 32rpx; |
|
|
} |
|
|
} |
|
|
.searchIcon{ |
|
|
|
|
|
|
|
|
.searchIcon { |
|
|
width: 40rpx; |
|
|
width: 40rpx; |
|
|
margin-left: 20rpx; |
|
|
margin-left: 20rpx; |
|
|
image{ |
|
|
|
|
|
|
|
|
image { |
|
|
width: 40rpx; |
|
|
width: 40rpx; |
|
|
height:40rpx |
|
|
height: 40rpx |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.uom{ |
|
|
|
|
|
|
|
|
.uom { |
|
|
margin-left: 10rpx; |
|
|
margin-left: 10rpx; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
</style> |
|
|
</style> |