Browse Source

合格转隔离

intex_online20241111
zhang_li 2 weeks ago
parent
commit
2eab172859
  1. 85
      src/pages/inventoryMove/coms/comMoveRecord.vue
  2. 4
      src/pages/inventoryMove/coms/comMoveRecordCard.vue
  3. 77
      src/pages/inventoryMove/coms/okToHoldRecordPack.vue

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

@ -12,7 +12,7 @@
<com-move-record-card :dataContent="item" :index="index" @removeData="removeData"
:isShowStatus="isShowStatus" @updateData="updateData" @removePack='removePack'
:allowEditQty="true"
:allowEditStatus="allowEditStatus">
:allowEditStatus="allowEditStatus" >
</com-move-record-card>
</view>
</view>
@ -35,7 +35,7 @@
<win-scan-button @goScan='showFromLocationPopup'></win-scan-button>
</view>
<!-- 合格转隔离单独的弹窗-->
<okToHoldRecordPack ref="okToHoldRecordPackRef" :fromLocationCodeProps='fromLocationCode' :itemCodeProps='itemCode' :batchProps='batch' :showOnePop='showOnePop' :isClearFromLocationCode='isClearFromLocationCode' :isClearItemCode='isClearItemCode' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg'></okToHoldRecordPack>
<okToHoldRecordPack ref="okToHoldRecordPackRef" :showOnePop='showOnePop' @showFromLocationPopup='showFromLocationPopup' @itemCodeClick='openScanPopup' @confirm='okToHoldRecordPackConfirm' @getInputMsgResult="getInputMsgResult" @itemCodeScanMsg='itemCodeScanMsg' @clickBtnClearFromLocation='clearFromLocation' @clickBtnClearItemCode='clearItemCode'></okToHoldRecordPack>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' @clearItemCode='clearItemCode' :title="'箱码'" >
</win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
@ -147,10 +147,6 @@
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
isShowEditLocation: false,
itemCode:'',
batch:'',
isClearFromLocationCode:false,//
isClearItemCode:false,//
}
},
@ -247,7 +243,12 @@
showFromLocationPopup() {
setTimeout(()=>{
if(this.showOnePop){
this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
this.$refs.okToHoldRecordPackRef.itemCode = ''
this.$refs.okToHoldRecordPackRef.batch = ''
this.$refs.okToHoldRecordPackRef.handleQty = 0
this.$refs.okToHoldRecordPackRef.showOne = true
}else{
this.$refs.scanFromLocationCode.openScanPopup();
}
@ -267,20 +268,19 @@
this.toLocationCode = code;
this.toLocationInfo = location;
},
getScanResult(result,managementType) {
getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
if(this.showOnePop){
this.itemCode= result.balance.itemCode
this.batch = result.balance.batch
this.isClearItemCode = false
debugger
this.$refs.okToHoldRecordPackRef.itemCode= result.balance.itemCode
this.$refs.okToHoldRecordPackRef.batch = result.balance.batch
this.getResult = result//
this.$refs.scanPopup.closeScanPopup()
}else{
if(managementType == "BY_BATCH" ||managementType == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result)
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.getScanResultAfterBatch(result,managementTypeParams)
}else{
this.getScanResultAfter(result)
this.getScanResultAfter(result,managementTypeParams)
}
}
@ -302,7 +302,7 @@
// this.getResult.fromLocationCode = obj.fromLocationCode
this.getResult.label.batch = obj.handleQty
this.getResult.label.qty = obj.handleQty
this.getScanResultAfterBatch(this.getResult)
this.getScanResultAfterBatch(this.getResult,this.managementType)
},
getScanResultAfter(result){
var balance = result.balance;
@ -364,7 +364,7 @@
}
calcHandleQty(this.detailSource);
},
getScanResultAfterBatch(result){
getScanResultAfterBatch(result,managementTypeParams){
var balance = result.balance;
this.balanceInfo = result.balance;
var pack = result.package;
@ -387,18 +387,31 @@
newDetail.toInventoryStatus = this.toInventoryStatus;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = Number(result.label.qty)
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
var detail = ''
console.log(9988,managementTypeParams)
if(managementTypeParams == 'BY_QUANTITY'){
detail = item.subList.find(r => {
if (r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}else if(managementTypeParams == 'BY_BATCH'){
detail = item.subList.find(r => {
if (r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.scaned == true) {
return r;
}
})
}
console.log(detail)
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
// newDetail.inventoryStatus = balance.inventoryStatus;
@ -412,12 +425,15 @@
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.managementTypeParams = managementTypeParams;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
console.log(999,detail.handleQty)
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
calcHandleQty(this.detailSource);
},
getInputMsgResult(result,fromWitch){
@ -426,17 +442,17 @@
},
//
clearFromLocation(fromLocationCodeParams){
this.fromLocationCode = fromLocationCodeParams
this.itemCode =''
this.batch =''
this.isClearFromLocationCode = true
this.$refs.okToHoldRecordPackRef.fromLocationCode = ''
this.$refs.okToHoldRecordPackRef.itemCode =''
this.$refs.okToHoldRecordPackRef.batch =''
// this.isClearFromLocationCode = true
},
//
//
clearItemCode(label){
this.itemCode = label.itemCode
this.batch =''
this.isClearItemCode = true
this.$refs.okToHoldRecordPackRef.itemCode =''
this.$refs.okToHoldRecordPackRef.batch =''
},
showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
@ -547,7 +563,12 @@
}
// if(this.balanceInfo)
console.log("提交" ,params)
let obj = params.subList.find(item=>item.balanceQty < item.handleQty)
if(obj){
this.$refs.comMessage.showConfirmWarningModal('批次[' +obj.batch + ']数量[' + obj.handleQty + ']不允许大于库存数量[' +obj.balanceQty + ']')
uni.hideLoading()
return
}
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {

4
src/pages/inventoryMove/coms/comMoveRecordCard.vue

@ -16,9 +16,9 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<comMovebalance :dataContent="item" :isShowStdPack="false" :isShowPack="true"
<comMovebalance :dataContent="item" :isShowStdPack="false"
:fromInventoryStatus="item.inventoryStatus" :toInventoryStatus="item.toInventoryStatus"
:isShowLocation="true" :allowEditStatus='allowEditStatus'></comMovebalance>
:isShowLocation="true" :allowEditStatus='allowEditStatus' :isShowPack='item.managementTypeParams == "BY_PACKAGING"' :isShowBatch='item.managementTypeParams == "BY_PACKAGING" || item.managementTypeParams == "BY_Batch"'></comMovebalance>
</uni-swipe-action-item>
</uni-swipe-action>
<view class='split_line'></view>

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

@ -10,8 +10,8 @@
<view class="item">
<view class="label">来源库位</view>
<view class="value">
<u-input v-model="fromLocationCode" @confirm="fromLocationScanMsg"></u-input>
<u-icon name="photo" color="#2979ff" size="28"></u-icon>
<u-input v-model="fromLocationCode" @blur="fromLocationScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearFromLocation"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="fromLocationClick"/>
@ -19,7 +19,10 @@
</view>
<view class="item">
<view class="label">零件</view>
<view class="value"><u-input v-model="itemCode" @confirm="itemCodeScanMsg" clearable></u-input></view>
<view class="value">
<u-input v-model="itemCode" @blur="itemCodeScanMsg"></u-input>
<u-icon name="close-circle-fill" color="#acacac" size="36" @click="clickBtnClearItemCode"></u-icon>
</view>
<view class="searchIcon">
<image src="/static/search.svg" mode="" @click="itemCodeClick"/>
</view>
@ -28,6 +31,7 @@
<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 = ''"></u-icon>
</view>
<view class="searchIcon"></view>
</view>
@ -65,7 +69,7 @@
components: {
winScanLocation
},
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult'],
emits: ["showFromLocationPopup",'itemCodeClick','confirm','getInputMsgResult','clearFromLocationCode','clickBtnClearItemCode'],
data() {
return {
handleQty:0,
@ -76,31 +80,11 @@
}
},
props: {
fromLocationCodeProps:{
type: String,
default: ''
},
//
showOnePop: {
type: Boolean,
default: false
},
itemCodeProps:{
type: String,
default: ''
},
batchProps:{
type: String,
default: ''
},
isClearFromLocationCode:{
type: Boolean,
default: false
},
isClearItemCode:{
type: Boolean,
default: false
},
},
mounted() {
},
@ -131,12 +115,15 @@
this.$emit("confirm",obj);
},
fromLocationScanMsg(){
if (this.fromLocationCode) {
console.log(111,this.fromLocationCode)
this.scanMsg = this.fromLocationCode
this.fromWitch = 'fromLocationScanMsg'
this.handelScanMsg()
}
},
itemCodeScanMsg(){
if (this.itemCode) {
if(!this.fromLocationCode){
this.$refs.comMessage.showMessage("请先扫描来源库位")
return
@ -144,6 +131,7 @@
this.fromWitch = 'itemCodeScanMsg'
this.scanMsg = this.itemCode
this.handelScanMsg()
}
},
handelScanMsg() {
//
@ -157,7 +145,7 @@
// that.scanMsg =that.scanMsg + "\n";
// }
console.log(that.scanMsg.includes('\n'))
// if (that.scanMsg.includes('\n')) {
if (that.scanMsg) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
@ -195,7 +183,7 @@
}
});
}, 200);
// }
}
},
losefocus() {
let that = this;
@ -203,38 +191,15 @@
that.boxfocus = false;
});
},
onClear(){
console.log(111)
}
},
watch: {
fromLocationCodeProps:{
handler(newVal, oldVal) {
if(this.isClearFromLocationCode){
this.fromLocationCode=''
}else{
this.fromLocationCode = newVal
}
},
// deep: true,
// immediate: true
clickBtnClearFromLocation(){
this.$emit("clickBtnClearFromLocation");
},
itemCodeProps: {
handler(newVal, oldVal) {
if(this.isClearItemCode){
this.itemCode=''
}else{
this.itemCode = newVal
}
},
},
batchProps(newVal) {
if(this.isClearItemCode){
this.batch=''
}else{
this.batch = newVal
}
clickBtnClearItemCode(){
this.$emit("clickBtnClearItemCode");
},
},
watch: {
}
}
</script>

Loading…
Cancel
Save