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. 66
      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

@ -4406,3 +4406,14 @@ export function getPrintTemplateList(params) {
method: "get" 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, pageSize: 100,
} }
getBalanceByFilter(params).then(res => { getBalanceByFilter(params).then(res => {
if (res.length == 0) { if (res.data.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存余额', res => { this.showErrorMessage('未查找到该包装的库存余额', res => {
this.packGetFocus(); this.packGetFocus();
}) })
@ -186,8 +186,14 @@
change(e) { change(e) {
this.show = e.show this.show = e.show
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
} }
});
},
}
} }
</script> </script>

18
src/pages/fg/fgChange.vue

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

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

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

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

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

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

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

Loading…
Cancel
Save