Compare commits

...

3 Commits

  1. 51
      src/pages/inventoryMove/coms/comMoveRecord.vue
  2. 53
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue

51
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -36,12 +36,13 @@
<!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop'
@showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup'
@confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult"
@itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack>
@onConfirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult"
></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
:locationAreaTypeList="fromLocationAreaTypeList"
@clearFromLocation="clearFromLocationCode"></win-scan-location>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -287,14 +288,13 @@
this.toLocationInfo = location;
},
getScanResult(result, managementTypeParams) {
console.log(222,result)
this.fromWarehouseCode =result.fromWarehouseCode
this.managementType = managementTypeParams
if (this.showOnePop) {
if (this.isJustReplay) {
this.$refs.okToHoldRecordPackRef.itemCode = result.label.itemCode
this.$refs.okToHoldRecordPackRef.batch = result.label.batch
this.$refs.okToHoldRecordPackRef.uom = result.package.uom
this.$refs.okToHoldRecordPackRef.uom = result.balance?result.balance.uom:""
this.getResult = result //
this.$refs.scanPopup.closeScanPopup()
} else {
@ -324,10 +324,6 @@
return;
}
this.checkItemCode(obj.itemCode, callBack => {
if (callBack) {
if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) {
this.getResult = this.getResult ? this.getResult : {
label: {},
fromLocationCode: ''
@ -338,17 +334,6 @@
this.getResult.label.qty = obj.handleQty
this.isJustReplay = false
this.$refs.scanPopup.getScanResult(this.getResult, this.businessType)
} else {
var hint = getListItemTypeDesc(this.itemCodeTypeList);
this.showErrorMessage("扫描物料[" + obj.itemCode + "]是[" +
getItemTypeName(callBack) + "],需要的物料类型是[" + hint + "]")
}
} else {
this.showErrorMessage('未查找到物料【' + obj.itemCode + '】');
}
})
},
//checkItemCode
@ -375,6 +360,10 @@
return true
},
clearFromLocationCode() {
this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
},
getScanResultAfter(result) {
var balance = result.balance;
@ -545,10 +534,28 @@
if (fromWitch == 'fromLocationScanMsg') {
this.isClearFromLocationCode = false
this.$refs.scanFromLocationCode.getScanResult(result)
} else if (fromWitch == 'itemCodeScanMsg') {
} else if (fromWitch == 'itemCodeScan') {
result.fromLocationCode = this.fromLocationCode
result.label.itemCode = result.label.code
this.checkItemCode(result.label.itemCode, callBack => {
if (callBack) {
if (checkDirectoryItemExist(this.itemCodeTypeList, callBack)) {
this.$refs.scanPopup.getScanResult(result)
} else {
this.$refs.okToHoldRecordPackRef.itemCode = ''
var hint = getListItemTypeDesc(this.itemCodeTypeList);
this.showErrorMessage("扫描物料[" + result.label.itemCode + "]是[" +
getItemTypeName(callBack) + "],需要的物料类型是[" + hint + "]")
}
} else {
this.$refs.okToHoldRecordPackRef.itemCode = ''
this.showErrorMessage('未查找到物料【' + result.label.itemCode + '】');
}
})
this.$refs.scanPopup.getScanResult(result)
console.log(result)
}
},
//

53
src/pages/inventoryMove/coms/okToHoldRecordPack.vue

@ -10,8 +10,11 @@
<view class="item">
<view class="label">来源库位</view>
<view class="value">
<u-input v-model="fromLocationCode"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="fromLocationCode=''" v-if="fromLocationCode"></u-icon>
<u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg" @blur="fromLocationScanMsg"
></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="fromLocationCode=''"
v-if="fromLocationCode"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick" />
@ -20,8 +23,9 @@
<view class="item">
<view class="label">零件</view>
<view class="value">
<u-input v-model="itemCode"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="itemCode=''" v-if="itemCode"></u-icon>
<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>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick" />
@ -31,7 +35,8 @@
<view class="label">批次</view>
<view class="value">
<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 class="searchIcon"></view>
</view>
@ -43,8 +48,9 @@
</view>
</view>
<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_confirm" hover-class="btn_edit_big_after" @click="confirm()">确认</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="clickConfirm">确认</button>
</view>
</u-popup>
@ -64,6 +70,10 @@
getLabelInfo
} from '../../../common/label.js';
import {
getBasicLocationByCode,
} from '@/api/request2.js';
import uom from '@/mycomponents/qty/uom.vue'
@ -73,7 +83,9 @@ import uom from '@/mycomponents/qty/uom.vue'
winScanLocation,
uom
},
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'],
emits: ["showFromLocationPopup", 'itemCodeClick', 'onConfirm', 'getInputMsgResult', 'clearFromLocationCode',
'clickBtnClearItemCode'
],
data() {
return {
handleQty: 0,
@ -92,8 +104,7 @@ import uom from '@/mycomponents/qty/uom.vue'
default: false
},
},
mounted() {
},
mounted() {},
methods: {
//
fromLocationClick() {
@ -109,7 +120,7 @@ import uom from '@/mycomponents/qty/uom.vue'
}
this.$emit("itemCodeClick");
},
confirm(){
clickConfirm() {
// this.$refs.scanLocationCode.openScanPopup()
let obj = {
@ -118,7 +129,7 @@ import uom from '@/mycomponents/qty/uom.vue'
batch: this.batch,
handleQty: this.handleQty,
}
this.$emit("confirm",obj);
this.$emit("onConfirm", obj);
// if(!obj.fromLocationCode){
// this.$refs.comMessage.showErrorMessage('');
// return;
@ -134,23 +145,29 @@ import uom from '@/mycomponents/qty/uom.vue'
},
fromLocationScanMsg() {
setTimeout(() => {
if (this.fromLocationCode) {
this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg'
this.isFromLocationFocus = false
this.handelScanMsg()
}
}, 500);
},
itemCodeScanMsg() {
setTimeout(() => {
if (this.itemCode) {
if (!this.fromLocationCode) {
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
}
this.fromWitch = 'itemCodeScanMsg'
this.fromWitch = 'itemCodeScan'
this.scanMsg = this.itemCode
this.handelScanMsg()
}
}, 500);
},
handelScanMsg() {
//
@ -228,6 +245,7 @@ import uom from '@/mycomponents/qty/uom.vue'
padding: 30rpx 20rpx;
display: flex;
border-bottom: 1px solid rgba(230, 230, 230, 1);
.title-txt {
flex: 1;
font-weight: bold;
@ -235,23 +253,28 @@ import uom from '@/mycomponents/qty/uom.vue'
}
}
.select {
display: flex;
}
.border {
border: 1px solid rgba(230, 230, 230, 1)
}
::v-deep .u-input__right-icon__clear {
display: flex;
align-items: center;
justify-content: center;
color: #a7a7a7;
}
.item {
display: flex;
align-items: center;
padding: 20rpx;
border-bottom: 1px solid #dedede;
.value {
flex: 1;
width: 0px;
@ -262,6 +285,7 @@ import uom from '@/mycomponents/qty/uom.vue'
font-size: 32rpx;
padding: 0px 20rpx;
}
.value1 {
flex: 1;
width: 0px;
@ -270,14 +294,17 @@ import uom from '@/mycomponents/qty/uom.vue'
align-items: center;
font-size: 32rpx;
}
.searchIcon {
width: 40rpx;
margin-left: 20rpx;
image {
width: 40rpx;
height: 40rpx
}
}
.uom {
margin-left: 10rpx;
}

Loading…
Cancel
Save