Browse Source

修改制品直接上架及物料变更

hella_online_20240829
niexiting 2 months ago
parent
commit
bee9f31488
  1. 11
      src/api/request2.js
  2. 8
      src/mycomponents/scan/winScanPackage.vue
  3. 18
      src/pages/fg/fgChange.vue
  4. 74
      src/pages/productPutaway/record/productPutawayRecord.vue
  5. 12
      src/pages/productReceipt/job/productReceiptDetail.vue
  6. 2
      src/pages/productionReceipt/coms/comProductionRecord.vue

11
src/api/request2.js

@ -4405,4 +4405,15 @@ export function getPrintTemplateList(params) {
url: baseApi + "/wms/print/modelList",
method: "get"
});
}
/**
* 物料变更
*/
export function fgChangeCommit(params) {
return request({
url: baseApi + "/wms/relegate-request-main/bind",
method: "post",
data: params,
});
}

8
src/mycomponents/scan/winScanPackage.vue

@ -156,7 +156,7 @@
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
if (res.length == 0) {
if (res.data.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存余额', res => {
this.packGetFocus();
})
@ -186,7 +186,13 @@
change(e) {
this.show = e.show
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
}
}
</script>

18
src/pages/fg/fgChange.vue

@ -83,7 +83,8 @@
<script>
import {
getSpareitemcode,
getProductreceiptDetailbByPackingNumber
getProductreceiptDetailbByPackingNumber,
fgChangeCommit
} from '@/api/request2.js';
import {
@ -313,14 +314,21 @@
},
commitChange() {
// uni.showLoading({
// title:'...',
// mask:true
// })
uni.showLoading({
title: '提交中...',
mask: true
})
let params = this.setParams();
console.log('params', JSON.stringify(params))
fgChangeCommit(params).then(res => {
let ss = res;
}).catch(err => {
this.showErrorMessage(err.message)
})
},

74
src/pages/productPutaway/record/productPutawayRecord.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
@ -9,8 +9,9 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" :isShowStatus="false"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowStatus="false" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
</view>
<view class='split_line'></view>
@ -33,9 +34,15 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location :balanceFromInventoryStatuses="false" ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<win-scan-package ref="scanPopup" @getResult='getScanResult'></win-scan-package>
<!-- <win-scan-pack-and-location :balanceFromInventoryStatuses="false" ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> -->
<!-- <win-com-scan-balance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="bussinessCode">
</win-com-scan-balance> -->
<!-- <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> -->
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -73,6 +80,8 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import winScanPackage from '@/mycomponents/scan/winScanPackage.vue'
import {
updateTitle
} from '@/common/basic.js';
@ -87,7 +96,8 @@
comBlankView,
winScanLocation,
winScanPackAndLocation,
recordComDetailCard
recordComDetailCard,
winScanPackage
},
data() {
return {
@ -101,30 +111,30 @@
fromLocationAreaTypeList: [],
tolocationTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
outInventoryStatus: "", //:"",
bussinessCode: "ProductPutaway",
businessType: {},
managementList: [],
type:''
type: ''
};
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title
title: option.title
})
this.type = option.type
if(this.type=='predict'){
if (this.type == 'predict') {
updateTitle('制品上架记录')
}else if(this.type=='assemble'){
} else if (this.type == 'assemble') {
updateTitle('装配上架记录')
}
var typeCode = "ProductPutaway"
getBusinessType(typeCode, res => {
getBusinessType(this.bussinessCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
@ -211,18 +221,20 @@
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
setTimeout(r => {
this.$refs.scanPopup.openScanPopupByBusinessType(this.businessType);
})
// setTimeout(r => {
// this.$refs.scanPopup.openScanPopup(this.businessType);
// this.scanPopupGetFocus();
// })
},
// showFromLocationPopup() {
// this.$nextTick(() => {
// this.$refs.scanLocationCode.openScanPopup();
// })
// },
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
@ -344,15 +356,15 @@
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty;
submitItem.package ="";
submitItem.package = "";
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList;
if(this.type){
if (this.type) {
this.dataContent.type = this.type;
}
this.dataContent.creator = creator;
@ -406,7 +418,7 @@
this.clearData();
})
},
clearData(){
clearData() {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
@ -462,4 +474,4 @@
background: #e0e0e0;
}
</style>
</style>

12
src/pages/productReceipt/job/productReceiptDetail.vue

@ -17,7 +17,7 @@
<view class="cell_info">
<view class="text_lightblue">生产线</view>
<view>
{{jobContent.subList[0].productionLineCode}}
{{productionLineCode}}
</view>
</view>
<view class="cell_info">
@ -40,7 +40,6 @@
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
@ -138,7 +137,8 @@
jobStatus: "",
jobToLocationCode: "",
status: '',
scanMessage: ""
scanMessage: "",
productionLineCode: ""
};
},
onLoad(option) {
@ -223,8 +223,10 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
that.jobStatus = res.data.status;
that.jobToLocationCode = that.subList[0].toLocationCode;
that.productionLineCode = that.jobContent.subList[0].productionLineCode;
if (that.jobContent.allowModifyLocation == 'FALSE') {
that.toLocationCode = that.subList[0].toLocationCode
}

2
src/pages/productionReceipt/coms/comProductionRecord.vue

@ -18,7 +18,7 @@
:right-options="item.scaned?scanOptions:detailOptions">
<!-- <balance :dataContent="item" :isShowStdPack="false" :isShowPack="true"
:isShowLocation="true"></balance> -->
<production-label :dataContent="item" :packageContent="item.package" :isShowStdPack="false"></production-label>
<production-label :dataContent="item" :packageContent="item.package" :isShowStdPack="false" :isShowLocation="false"></production-label>
</uni-swipe-action-item>
</uni-swipe-action>
<view class='split_line'></view>

Loading…
Cancel
Save