Browse Source

修改直接退料

wms3.0_pda
Niext 11 months ago
parent
commit
caf443185a
  1. 89
      mycomponents/scan/winScanPackAndPosition.vue
  2. 67
      mycomponents/workstation/workstation.vue
  3. 13
      pages/issue/coms/comIssueRequestCreator.vue
  4. 13
      pages/issue/coms/comIssueRequestDetailCard.vue
  5. 10
      pages/issue/job/issueDetail.vue
  6. 12
      pages/issue/record/issueRecord.vue
  7. 15
      pages/productionReturn/coms/comReturnRecord.vue
  8. 8
      pages/productionReturn/coms/comReturnRecordTitle.vue
  9. 29
      pages/productionReturn/record/returnToHold.vue
  10. 23
      pages/productionReturn/record/returnToStore.vue

89
mycomponents/scan/winScanPackAndPosition.vue

@ -1,6 +1,6 @@
<template>
<view>
<uni-popup ref="popup" @maskClick="closeScanPopup()">
<uni-popup ref="popup" @maskClick="closeScanPopup()">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
@ -34,8 +34,8 @@
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult"
:headerType="headerType" :isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
@ -68,7 +68,7 @@
type: Boolean,
default: true
},
headerType:{
headerType: {
type: String,
default: 'HPQ,HMQ'
}
@ -86,7 +86,7 @@
workShopName: "",
productionLineName: "",
workStationName: "",
isEditPosition:true
isEditPosition: true
}
},
created() {
@ -94,8 +94,8 @@
},
methods: {
openScanPopup() {
if(this.positionList.length==0){
if (this.positionList.length == 0) {
uni.showLoading({
title: "数据加载中....",
mask: true
@ -108,47 +108,49 @@
this.showErrorMessage(error)
})
}
this.$refs.popup.open('bottom');
},
closeScanPopup() {
this.$refs.popup.close();
this.$emit("close", '');
},
scanClick() {
this.$refs.comscan.clickScanMsg();
},
cancelClick() {
this.$refs.comscan.clearScanValue();
},
getScanResult(result) {
if(this.positionInfo=="请选择位置"){
if (this.positionInfo == "请选择位置") {
this.showErrorMessage("请先选择位置")
return
}
var param = {
positionInfo:this.positionInfo,
workshopCode:this.workshopCode,
productionLineCode:this.productionLineCode,
workStationCode:this.workStationCode
positionInfo: this.positionInfo,
workshopCode: this.workshopCode,
productionLineCode: this.productionLineCode,
workStationCode: this.workStationCode,
rawLocationCode: this.rawLocationCode,
fgLocationCode: this.fgLocationCode,
}
if (result.success) {
this.isEditPosition = false
this.$emit("getResult", result,param);
this.$emit("getResult", result, param);
} else {
this.showErrorMessage(result.message)
}
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
@ -156,17 +158,16 @@
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
if (res) {}
});
},
showSelect() {
if(this.isEditPosition){
if (this.isEditPosition) {
this.show = !this.show
}
},
confirmSelect(e) {
this.positionInfo = e[0].label + "-" + e[1].label + "-" + e[2].label
@ -177,25 +178,25 @@
this.workShopName = e[0].label
this.productionLineName = e[1].label
this.workStationName = e[2].label
// let shop = this.positionList.find(shop => shop.value == this.workshopCode);
// if (shop != undefined && shop.children != undefined) {
// let prodLine = shop.children.find(line => line.value == this.productionLineCode);
// if (prodLine != undefined && prodLine.children != undefined) {
// let station = prodLine.children.find(r => r.value == this.workStationCode);
// if (station.rawLocationCode == '' && station.rawLocationCode == null) {
// this.showErrorMessage(this.workStationName + ",")
// return;
// } else {
// this.rawLocationCode = station.rawLocationCode;
// this.fgLocationCode = station.fgLocationCode;
// }
// } else {
// this.showErrorMessage("线-")
// }
// } else {
// this.showErrorMessage("-线")
// }
let shop = this.positionList.find(shop => shop.value == this.workshopCode);
if (shop != undefined && shop.children != undefined) {
let prodLine = shop.children.find(line => line.value == this.productionLineCode);
if (prodLine != undefined && prodLine.children != undefined) {
let station = prodLine.children.find(r => r.value == this.workStationCode);
if (station.rawLocationCode == '' && station.rawLocationCode == null) {
this.showErrorMessage(this.workStationName + "的原材料库位为空,请重新选择")
return;
} else {
this.rawLocationCode = station.rawLocationCode;
this.fgLocationCode = station.fgLocationCode;
}
} else {
this.showErrorMessage("生产线-工位基础信息维护错误")
}
} else {
this.showErrorMessage("车间-生产线基础信息维护错误")
}
},
}
}

67
mycomponents/workstation/workstation.vue

@ -0,0 +1,67 @@
<template>
<view class="header_job_top">
<view class="cen_card">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
<view class="text_lightblue">车间</view>
<view>{{workshopCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">生产线</view>
<view>{{productionLineCode}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">工位</view>
<view>{{ workStationCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">原材料库位</view>
<view>{{ rawLocationCode }}</view>
</view>
<!-- <view class="cell_info">
<view class="text_lightblue">成品库位</view>
<view>{{ fgLocationCode }}</view>
</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
watch: {},
props: {
workshopCode: {
type: String,
default: ""
},
productionLineCode: {
type: String,
default: ""
},
workStationCode: {
type: String,
default: ""
},
rawLocationCode: {
type: String,
default: ""
},
fgLocationCode: {
type: String,
default: ""
},
},
methods: {}
}
</script>
<style>
</style>

13
pages/issue/coms/comIssueRequestCreator.vue

@ -1,8 +1,11 @@
<template>
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-column">
<com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</com-issue-request-info>
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="dataContent">
</com-issue-request-info> -->
<work-station :workshopCode="dataContent.workShopCode" :productionLineCode="dataContent.productionLineCode"
:workStationCode="dataContent.workStationCode" :rawLocationCode="dataContent.toLocationCode"></work-station>
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions">
@ -26,7 +29,8 @@
import itemQty from '@/mycomponents/item/itemQty.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import requestDetailInfoPopup from '@/pages/issue/coms/requestDetailInfoPopup.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
@ -42,7 +46,8 @@
comMessage,
itemQty,
comIssueRequestInfo,
requestDetailInfoPopup
requestDetailInfoPopup,
workStation
},
props: {
dataContent: {

13
pages/issue/coms/comIssueRequestDetailCard.vue

@ -1,8 +1,11 @@
<template>
<view class="" style="background-color: #fff;">
<view class="uni-flex uni-column">
<com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="requestItem">
</com-issue-request-info>
<!-- <com-issue-request-info :workShopCode="dataContent.workshopCode" :dataContent="requestItem">
</com-issue-request-info> -->
<work-station :workshopCode="dataContent.workShopCode" :productionLineCode="requestItem.productionLineCode"
:workStationCode="requestItem.workStationCode" :rawLocationCode="requestItem.toLocationCode"></work-station>
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions">
@ -27,7 +30,8 @@
import itemQty from '@/mycomponents/item/itemQty.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import requestDetailInfoPopup from '@/pages/issue/coms/requestDetailInfoPopup.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
@ -43,7 +47,8 @@
comMessage,
itemQty,
comIssueRequestInfo,
requestDetailInfoPopup
requestDetailInfoPopup,
workStation
},
props: {
dataContent: {

10
pages/issue/job/issueDetail.vue

@ -10,9 +10,9 @@
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource">
<com-issue-request-info :workShopCode="jobContent.workShopCode" :dataContent="toLocation">
</com-issue-request-info>
<view v-for="(toLocation, index) in detailSource">
<work-station :workshopCode="jobContent.workShopCode" :productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"></work-station>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" @updateData='updateData'>
</com-issue-detail-card>
</view>
@ -68,6 +68,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
export default {
name: 'issueDetail',
@ -78,7 +79,8 @@
comIssueRequestInfo,
comScanIssuePack,
comMessage,
jobTop
jobTop,
workStation
},
data() {
return {

12
pages/issue/record/issueRecord.vue

@ -8,8 +8,10 @@
<scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource">
<view class="uni-row uni-flex">
<com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation">
</com-issue-request-info>
<!-- <com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation">
</com-issue-request-info> -->
<work-station :workshopCode="workShopCode" :productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"></work-station>
</view>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'>
@ -64,7 +66,8 @@
import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
export default {
name: '',
components: {
@ -76,7 +79,8 @@
comIssueRequestInfo,
comIssueDetailCard,
winScanButton,
comScanIssuePack
comScanIssuePack,
workStation
},
data() {
return {

15
pages/productionReturn/coms/comReturnRecord.vue

@ -16,18 +16,19 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true"
:isShowPack="true" :isShowLocation="false" :isShowToLocation="true"></balance>
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true"
:isShowLocation="false" :isShowToLocation="isShowToLocation"></balance>
<!-- <production-label :dataContent="item" :packageContent="item.package"
:isShowLocation="false">
</production-label> -->
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref="recommendQtyEdit" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm" :isShowStatus="isShowStatus"></recommend-qty-edit>
<recommend-qty-edit ref="recommendQtyEdit" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm"
:isShowStatus="isShowStatus"></recommend-qty-edit>
<package-detail-popup ref='packageDetailPopup'>
</package-detail-popup>
<comMessage ref="comMessage"></comMessage>
@ -44,7 +45,7 @@
import comMessage from '@/mycomponents/common/comMessage.vue'
import packageDetailPopup from '@/mycomponents/package/packageDetailPopup.vue'
import balance from '@/mycomponents/balance/balance.vue'
import {
getDetailOption,
getDetailEditRemoveOption,
@ -81,6 +82,10 @@
isShowStatus: {
type: Boolean,
default: false
},
isShowToLocation: {
type: Boolean,
default: true
}
},
watch: {

8
pages/productionReturn/coms/comReturnRecordTitle.vue

@ -14,6 +14,10 @@
<view class="text_lightblue">工位</view>
<view>{{ workStationCode }}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">原材料库位</view>
<view>{{ rawLocationCode }}</view>
</view>
</view>
</view>
</view>
@ -41,6 +45,10 @@
type: String,
default: ""
},
rawLocationCode: {
type: String,
default: ""
},
},
methods: {}

29
pages/productionReturn/record/returnToHold.vue

@ -5,8 +5,9 @@
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<comReturnRecordTitle :workshopCode="workshopCode" :productionLineCode="productionLineCode"
:workStationCode="workStationCode"></comReturnRecordTitle>
<work-station :workshopCode="workshopCode" :productionLineCode="productionLineCode"
:workStationCode="workStationCode" :rawLocationCode="rawLocationCode"
:fgLocationCode="fgLocationCode"></work-station>
</view>
<u-line />
<view class="page-main">
@ -14,7 +15,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack="removePack">
@updateData="updateData" @removePack="removePack" :isShowToLocation="false">
</comReturnRecord>
</view>
<u-line />
@ -26,6 +27,16 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<view class="">
<view class="uni-flex uni-row u-col-center" @click="showLocation">
<view>
目标库位
<text style="font-size: 35rpx;color:#3FBAFF;">&nbsp HOLD</text>
</view>
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;"
src="/static/icons/icons_edit.svg"></image>
</view>
</view>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -69,8 +80,7 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
export default {
name: 'comReturn',
@ -82,7 +92,8 @@
comMessage,
comReturnRecord,
winScanPack,
winScanPackAndPosition
winScanPackAndPosition,
workStation
},
watch: {},
@ -156,6 +167,7 @@
this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode;
this.rawLocationCode = param.rawLocationCode;
let label = result.label;
let pack = result.package;
@ -216,7 +228,8 @@
detail.inventoryStatus = "HOLD"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
detail.batch = pack.batch;
detail.packingNumber = pack.number;
detail.package = pack;
detail.label = label;
return detail;
@ -419,7 +432,7 @@
this.clearData();
})
},
clearData(){
clearData() {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';

23
pages/productionReturn/record/returnToStore.vue

@ -5,8 +5,9 @@
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-header">
<comReturnRecordTitle :workshopCode="workshopCode" :productionLineCode="productionLineCode"
:workStationCode="workStationCode"></comReturnRecordTitle>
<work-station :workshopCode="workshopCode" :productionLineCode="productionLineCode"
:workStationCode="workStationCode" :rawLocationCode="rawLocationCode"
:fgLocationCode="fgLocationCode"></work-station>
</view>
<u-line />
<view class="page-main">
@ -70,8 +71,7 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import winScanPackAndPosition from "@/mycomponents/scan/winScanPackAndPosition.vue"
import comReturnRecordTitle from '@/pages/productionReturn/coms/comReturnRecordTitle.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
export default {
name: 'comReturn',
@ -83,7 +83,8 @@
comMessage,
comReturnRecord,
winScanPack,
winScanPackAndPosition
winScanPackAndPosition,
workStation
},
watch: {},
@ -158,10 +159,13 @@
this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode;
this.workStationCode = param.workStationCode;
this.rawLocationCode = param.rawLocationCode;
debugger;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
@ -169,7 +173,6 @@
})
if (item == undefined) {
//
this.getRecommendLocation(label, pack, toLocation => {
var itemp = this.createItemInfo(label, pack);
@ -178,11 +181,8 @@
newDetail.toWarehouseCode = toLocation.warehouseCode;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
})
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
@ -229,7 +229,8 @@
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
detail.batch = pack.batch;
detail.packingNumber = pack.number;
detail.package = pack;
detail.label = label;
return detail;
@ -459,7 +460,7 @@
this.clearData();
})
},
clearData(){
clearData() {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';

Loading…
Cancel
Save