Browse Source

非生产退料

pda_nev
李俊城 7 months ago
parent
commit
4c416a665f
  1. 17
      fe/PDA/api/index.js
  2. 10
      fe/PDA/common/basic.js
  3. 105
      fe/PDA/mycomponents/comjob/comJobUnScanDetail.vue
  4. 5
      fe/PDA/mycomponents/common/comMessage.vue
  5. 40
      fe/PDA/mycomponents/coms/task/comUnProduce.vue
  6. 2
      fe/PDA/pages.json
  7. 3
      fe/PDA/pages/task/unProducePickDetail.vue
  8. 6
      fe/PDA/pages/task/unProduceReturn.vue
  9. 598
      fe/PDA/pages/task/unProduceReturnDetail.vue
  10. 2
      fe/PDA/pages/task/unProduceReturnWip.vue
  11. 469
      fe/PDA/pages/task/unProduceReturnWipDetail.vue

17
fe/PDA/api/index.js

@ -761,10 +761,23 @@ export const getUnProduceReturnDetail = (params) => request(
data: {},
method: "get"
});
//非生产退料 承接任务
export const takeUnProduceReturnJob = (params) => request(
devUrl + "/api/pda/job/unplanned-receipt/take/" + params.id, { //
data: {},
method: "post"
});
//非生产退料 取消承接任务
export const cancelTakeUnProduceReturnJob = (id) => request(
devUrl + "/api/pda/job/unplanned-receipt/cancel-take/" + id, { //
data: {},
method: "post"
});
//完成非生产退料任务
export const finshUnProduceReturnJob = (id, params) => request(
devUrl + "/api/pda/job/unplanned-receipt/finish/" + id, { //
export const finshUnProduceReturnJob = (id,jobNumber,worker ,params) => request(
devUrl + "/api/pda/job/unplanned-receipt/finish/"+id+"?jobNumber="+jobNumber+"&worker="+worker, { //
data: params,
method: "post"
})

10
fe/PDA/common/basic.js

@ -482,4 +482,14 @@ export function getIssueJobState(val) {
if (val == 0) return 'ALL'
else if (val == 1) return 'Open'
else if (val == 2) return 'Wait'
}
const S4 = function() {
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
};
export function guid() {
return (S4() + S4() +'-' +S4() +'-' +S4() +'-' +S4() +'-' +S4() +S4() +S4()
);
}

105
fe/PDA/mycomponents/comjob/comJobUnScanDetail.vue

@ -0,0 +1,105 @@
<!-- 收货任务详情 -->
<template>
<view class="device-detail" style="padding-bottom: 0 !important;">
<com-job-top-info :jobContent="jobContent"></com-job-top-info>
<!-- <view class="ljh_box nopad">
<text class="state-style fl margin_xs_top" :class="jobContent.jobStatus | statusStyle">
{{ jobContent.jobStatus | statusColor }}
</text>
<text class="tit_ljh">{{ jobContent.number }}</text>
</view> -->
<view class="label_order">
<text >ERP储位</text>
<text style="font-weight: bold; color:black" >{{jobContent.fromErpLocationCode}}</text>
</view>
<view class="label_order">
<text >料号</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemCode}}</text>
</view>
<view class="label_order">
<text >名称</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemName}}</text>
</view>
<view class="label_order">
<text >描述1</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemDesc1}}</text>
</view>
<view class="label_order">
<text >描述2</text>
<text style="font-weight: bold; color:black" >{{jobContent.itemDesc2}}</text>
</view>
<view class="label_order">
<text >需求数量</text>
<text style="font-weight: bold; color:black" >{{jobContent.qty}}</text>
</view>
<view class="label_order">
<text >扫描数量</text>
<text style="font-weight: bold; color:black" >{{scanCount}}</text>
</view>
</view>
</template>
<script>
import {
getJobStatuStyle,
getJobStatuDesc,
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import comJobTopInfo from '@/mycomponents/comjob/comJobTopInfo.vue'
export default {
name: 'comJobScanDetail',
components: {
comJobTopInfo
},
props: {
jobContent: {
type: Object,
default: {}
},
allCount: {
type: Number,
default: 0
},
scanCount: {
type: Number,
default: 0
},
},
data() {
return {
};
},
filters: {
statusStyle: function(val) {
return getJobStatuStyle(val);
},
statusColor: function(val) {
return getJobStatuDesc(val);
}
},
mounted() {
},
methods: {
calcCount(a,b){
return calc.sub(a,b)
}
}
}
</script>
<style scoped lang="scss">
</style>

5
fe/PDA/mycomponents/common/comMessage.vue

@ -105,7 +105,10 @@
closeMessage() {
this.confirmResult = false;
clearInterval(this.timer) //timer
this.$refs.popupMessage.close();
if(this.$refs.popupMessage){
this.$refs.popupMessage.close();
}
this.afterClose();
},

40
fe/PDA/mycomponents/coms/task/comUnProduce.vue

@ -9,18 +9,37 @@
</view>
<view class="margin_xs_bottom" style="clear: both;">
<view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image>
<text v-if="fromType=='pick'">{{dataContent.unplannedIssueRequestNumber}}</text>
<!-- <image class="icon_normal" src="@/static/icons_ui/icon_apply_num.svg"></image> -->
<text>单号</text>
<text style="font-weight: bold; color:black" v-if="fromType=='pick'">{{dataContent.unplannedIssueRequestNumber}}</text>
<!-- <text>申请单{{dataContent.materialRequestNumber}}</text> -->
<text v-else>{{dataContent.unplannedReceiptRequestNumber}}</text>
<text style="font-weight: bold; color:black" v-else>{{dataContent.unplannedReceiptRequestNumber}}</text>
</view>
<!-- <view class="label_order">
<image class="icon_normal" src="@/static/icons_ui/icon_prod_line.svg"></image>
<text>{{dataContent.prodLine}}</text>
<text>生产线{{dataContent.prodLine}}</text>
</view> -->
<view class="label_order">
<text >ERP储位</text>
<text style="font-weight: bold; color:black" >{{dataContent.fromErpLocationCode}}</text>
</view>
<view class="label_order">
<text >料号</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemCode}}</text>
</view>
<view class="label_order">
<text >名称</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemName}}</text>
</view>
<view class="label_order">
<text >描述1</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemDesc1}}</text>
</view>
<view class="label_order">
<text >描述2</text>
<text style="font-weight: bold; color:black" >{{dataContent.itemDesc2}}</text>
</view>
</view>
<view class="uni-flex uni-row receipt_bot">
<view class="label_order">
@ -29,6 +48,9 @@
<text
class="text_darkblue">{{dataContent.creationTime===null?'无':dataContent.creationTime| formatDate}}</text>
</view>
<view class="">
{{dataContent.worker}}
</view>
</view>
</view>
</template>

2
fe/PDA/pages.json

@ -588,7 +588,7 @@
"path": "pages/task/unProduceReturnDetail",
"style": {
"navigationBarTitleText": "非生产退料详情",
"enablePullDownRefresh": true
"enablePullDownRefresh": false
}
},

3
fe/PDA/pages/task/unProducePickDetail.vue

@ -308,6 +308,7 @@
dyIssue(result, scaned) {
let that = this;
result.data.lot ='20240717'
var itemCode = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.scaned === scaned
@ -574,6 +575,8 @@
.userName_CN;
that.datacontent.details = that.details;
let params = JSON.stringify(that.datacontent);
console.log(params)
return
finshUnProducePickJob(that.id, params)
.then(res => {
uni.hideLoading();

6
fe/PDA/pages/task/unProduceReturn.vue

@ -70,6 +70,10 @@
mounted() {
},
onPullDownRefresh() {
this.getList('refresh');
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
@ -147,7 +151,7 @@
openDetail(item) {
uni.navigateTo({
url: './unProduceReturnDetail?id=' + item.id
url: './unProduceReturnDetail?id=' + item.id+ '&jobStatus=' + item.jobStatus
});
},

598
fe/PDA/pages/task/unProduceReturnDetail.vue

@ -3,100 +3,90 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
<comJobUnScanDetail :jobContent="datacontent" :scanCount="scanCount">
</comJobUnScanDetail>
</view>
<scroll-view :scroll-top="scrollTop" scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower"
@scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
@scroll="scroll" class="scroll-detail" >
<view class="" style="margin-bottom:120rpx">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" :auto-close="false"
@click="swipeClick($event,item,index)" style='background-color: #ffffff;'>
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="360" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index"
v-model="item.handledQty" :max="99999" :min="0"
style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text v-if="false" class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">箱码</uni-th>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="360" align="center">
<view class="text_packingCode">
{{ item.handledPackingCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">批次</uni-th>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="360" align="center">
<view class="text_black">{{item.handledLot }}</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view v-if="item.scaned" class="choose_marked_count"
style="background-color: #5FCB94; opacity: 0.65">
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;">
</view>
<!-- <image src="@/static/image_marked.svg"></image> -->
</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<!-- <uni-th width="90"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="100" align="center">实际</uni-th> -->
<uni-th width="50"></uni-th>
<uni-th width="120" align="center">推荐</uni-th>
<uni-th width="120" align="center">实际</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="120" align="center">
<text class="text_black">{{item.recommendQty}}({{item.uom}})</text>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty"
:max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">箱码</uni-th>
<uni-th width="120" align="center">
<view class="text_packingCode">
{{ item.recommendPackingCode }}
</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_packingCode">
{{ item.handledPackingCode }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">批次</uni-th>
<uni-th width="120" align="center">
<view class="text_black">{{item.recommendLot }}</view>
</uni-th>
<uni-th width="120" align="center">
<view v-if="item.scaned" class="text_black">{{item.handledLot }}</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="70">目标库位</uni-th>
<uni-th width="100" align="center">
<view class="text_black">{{ item.recommendToLocationCode }}</view>
</uni-th>
<uni-th width="100" align="center">
<view class="text_black" v-if="item.scaned">
{{ item.toLocationCode }}
</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view v-if="item.scaned" class="choose_marked_count"
style="background-color: #5FCB94; opacity: 0.65">
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;">
</view>
<!-- <image src="@/static/image_marked.svg"></image> -->
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
<view class="new_bot_box">
<win-collapse-location ref='comCollapseLocation' @getLocationCode='getToLocation' @clear='clearLocation'>
</win-collapse-location>
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</view>
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
@ -111,9 +101,10 @@
<script>
import {
getUnProduceReturnDetail,
takeIssueJob,
cancelTakeIssueJob,
takeUnProduceReturnJob,
cancelTakeUnProduceReturnJob,
finshUnProduceReturnJob,
locations
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -123,16 +114,20 @@
compareDesc,
compareStr,
getCurrDateTime,
getCurrDateTimeAndT,
scanSuccessAudio,
scanFailedAudio
scanFailedAudio,
getRemoveOption,
guid
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winMulitScan from '@/mycomponents/wincom/winMulitScan.vue'
import comBalance from '@/mycomponents/common/comBalance.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import comJobUnScanDetail from '@/mycomponents/comjob/comJobUnScanDetail.vue'
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
export default {
components: {
@ -140,15 +135,16 @@
winScanButton,
winMulitScan,
comBalance,
comJobScanDetail,
comJobUnScanDetail,
winScanByPack,
comNumberBox
comNumberBox,
winCollapseLocation
},
data() {
return {
id: "",
datacontent: {},
details: {},
details: [],
toLocation: '',
scrollTop: 0,
old: {
@ -162,6 +158,9 @@
scanCount: 0,
isPack: true,
titleArray: ['箱标签'],
options: [],
locationInfo:null,
jobStatus: "",
}
},
filters: {
@ -177,14 +176,14 @@
},
onLoad(param) {
this.id = param.id;
// if (param.jobStatus == 1) {
// this.receive((callback => {
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
this.options = getRemoveOption();
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
onReady() {},
//
@ -197,12 +196,20 @@
},
//
onBackPress(e) {
//
// cancelTakeIssueJob(this.id)
// .then(res => {})
// .catch(err => {
// this.showMessage(err.message);
// });
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeUnProduceReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
@ -220,6 +227,7 @@
},
//
getDetail() {
let that = this;
if (that.id == undefined) {
return;
@ -235,180 +243,171 @@
.then(item => {
console.log('item', item);
that.datacontent = item;
that.details = item.details;
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
}
);
that.ispending = item.jobStatus === 2;
// if (that.toLocation === '') {
// that.toLocation = item.details[0].requestLocationCode;
// }
this.allCount = that.details.length;
this.scanCount = 0;
}
that.jobStatus = item.jobStatus;
that.scanCount = 0
uni.hideLoading();
})
.catch(err => {
this.showMessage('未查找到详细信息')
uni.hideLoading();
});
},
getScanResult(result) {
let item = this.details.find(r => r.recommendPackingCode === result.data.packingCode && r
.scanPackingCode != result.data.packingCode);
if (item != undefined && item.scaned) {
scanFailedAudio()
showConfirmMsg('扫描的箱码【' + result.data.packingCode + '】匹配到任务中的【' + item.scanPackingCode +
'】箱,是否要重新匹配任务中的【' + item.scanPackingCode + '】箱?',
confirm => {
if (confirm) {
this.handledPackCode(result, true);
} else {
return;
swipeClick(e, item, index) {
let {
content
} = e;
if (content.text === '移除') {
uni.showModal({
title: '提示',
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
this.details.splice(index, 1)
this.scanCount = 0;
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty
})
}
})
} else {
if (this.allCount === this.scanCount) {
scanFailedAudio()
this.showMessage("零件已经全部扫描完成");
return;
}
this.handledPackCode(result, false);
}
});
}
this.scrollToTop();
// //
// let item = this.details.find(r => r.recommendPackingCode === result.data.packingCode && r
// .scanPackingCode != result.data.packingCode);
// if (item != undefined && item.scaned) {
// showConfirmMsg('' + result.data.packingCode + '' + item.scanPackingCode +
// ',' + item.scanPackingCode + '?',
// confirm => {
// if (confirm) {
// this.handledPackCode(result, true);
// } else {
// return;
// }
// })
// } else {
// if (this.allCount === this.scanCount) {
// this.showMessage("");
// return;
// }
// this.handledPackCode(result, false);
// }
// this.scrollToTop();
},
//
//scaned
handledPackCode(result, scaned) {
//
let that = this;
that.currentScanLebel = result;
let scanItem = this.details.find(r => r.scanItemCode === that.currentScanLebel.data.itemCode &&
r.scanPackingCode === that.currentScanLebel.data.packingCode &&
r.scanLot === that.currentScanLebel.data.lot &&
r.scaned == true)
if (scanItem != undefined) {
this.showScanMessage('箱码【' + that.currentScanLebel.data.packingCode + '】已经扫描,请扫描下一箱零件');
} else {
this.dyIssue(result, scaned);
getScanResult(result) {
if (result.data.itemCode != this.datacontent.itemCode) {
this.showScanMessage('扫描箱码【' + result.data.code + '】对应的物料\n【' + result.data.itemCode + '】与任务中的料号不一致');
return
}
},
dyIssue(result, scaned) {
let that = this;
var itemCode = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.scaned === scaned
})
if (itemCode == undefined) {
that.showScanMessage('所扫描的箱码【' + result.data.code + '】对应的物料【' + result.data.itemCode + '】不在任务中');
let scanItem = this.details.find(r => r.itemCode === result.data.itemCode &&
r.handledPackingCode === result.data.code)
if (scanItem) {
this.showScanMessage('箱码【' + result.data.code + '】已经扫描');
} else {
//ERP
var itemCode1 = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.recommendPackingCode === result.data.code
r.scaned === scaned
})
//ERP
if (itemCode1 == undefined) {
var itemCode2 = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.recommendLot === result.data.lot &&
r.scaned === scaned
})
//ERP
if (itemCode2 == undefined) {
//ERP
console.log("ERP料号相同、箱码不相同、批次不相同")
that.currentItem = itemCode;
that.afterScanPackLabel(result);
// setTimeout(res => {
// showConfirmMsg(itemCode.recommendPackingCode+',?', confirm => {
// if (confirm) {
// that.currentItem = itemCode;
// that.afterScanPackLabel(result);
// } else {
// that.scanPopupGetFocus();
// }
// });
// }, 100)
// if (this.scanCount == this.datacontent.qty) {
// this.showMessage("")
// return;
// }
} else {
console.log("ERP料号相同、箱码不相同、批次相同")
//ERP
that.currentItem = itemCode2;
that.afterScanPackLabel(result);
}
var item = {
itemCode: result.data.itemCode,
handledPackingCode: result.data.code,
handledLot: result.data.lot,
handledQty: Number(this.datacontent.qty)
}
this.setParam(item,result)
this.details.push(item)
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.scanCount = 0;
this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty
})
this.$forceUpdate()
}
},
getToLocation(code) {
if (code == '') {
this.showMessage('目标库位不能为空');
return;
}
uni.showLoading({
title: "扫描中",
mask: true
});
let that = this;
locations(code).then(res => {
if (res == null) {
scanFailedAudio()
that.showMessage('目标库位【' + code + '】不存在');
this.$refs.comCollapseLocation.clearLocation();
} else {
//ERP
var itemCode3 = that.details.find(r => {
return r.itemCode === result.data.itemCode &&
r.recommendPackingCode === result.data.code &&
r.recommendLot === result.data.lot &&
r.scaned === scaned
})
if (itemCode3 == undefined) {
//ERP
console.log("ERP料号相同、箱码相同、批次不同")
that.currentItem = itemCode1;
that.afterScanPackLabel(result);
// setTimeout(res => {
// showConfirmMsg(itemCode1.recommendPackingCode+',?', confirm => {
// if (confirm) {
// that.currentItem = itemCode1;
// that.afterScanPackLabel(result);
// } else {
// that.scanPopupGetFocus();
// }
// });
// }, 100)
if (that.datacontent.fromErpLocationCode != res.erpLocationCode) {
scanFailedAudio()
that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' +
this.datacontent.fromErpLocationCode +
'】不是同一ERP储位,请重新扫描');
this.$refs.comCollapseLocation.clearLocation();
} else {
console.log("ERP料号相同、箱码相同、批次相同")
//ERP
that.currentItem = itemCode3;
that.afterScanPackLabel(result);
scanSuccessAudio()
this.locationInfo=res
}
}
}
uni.hideLoading();
}).catch(err => {
scanFailedAudio()
that.locationInfo = null;
that.showMessage(err.message);
uni.hideLoading();
})
},
clearLocation() {
this.locationInfo = null;
},
setParam(item, result) {
item.id = guid(),
item.creationTime = getCurrDateTimeAndT()
item.creatorId =guid()
item.lastModificationTime = getCurrDateTimeAndT()
item.lastModifierId = guid()
item.masterID = this.datacontent.id
item.number = this.datacontent.number
item.remark = ""
item.itemName = result.data.itemName
item.itemDesc1 = result.data.itemDesc1
item.itemDesc2 = result.data.itemDesc2
item.itemCode = result.data.itemCode
item.stdPackQty = result.data.stdPackQty
item.status = 2
item.recommendContainerCode = ""
item.recommendPackingCode = result.data.packingCode
item.recommendSupplierBatch = result.data.supplierBatch
item.recommendArriveDate = result.data.arriveDate
item.recommendProduceDate = result.data.produceDate
item.recommendExpireDate = result.data.expireDate
item.recommendLot = result.data.lot
item.recommendToLocationCode = ""
item.recommendToLocationArea = ""
item.recommendToLocationGroup = ""
item.recommendToLocationErpCode = ""
item.recommendToWarehouseCode = ""
item.recommendQty = item.handledQty
item.uom = result.data.uom
item.handledContainerCode = result.data.containerCode
item.handledPackingCode = result.data.packingCode
item.handledSupplierBatch = result.data.supplierBatch
item.handledArriveDate = result.data.arriveDate
item.handledProduceDate = result.data.produceDate
item.handledExpireDate = result.data.expireDate
item.handledLot = result.data.lot
item.handledToLocationCode = ""
item.handledToLocationArea = ""
item.handledToLocationGroup = ""
item.handledToLocationErpCode = ""
item.handledToWarehouseCode = ""
item.handledQty = item.handledQty
item.extraProperties= {
additionalProp1: "",
additionalProp2: "",
additionalProp3: ""
}
},
setParams(item, result) {
item.scaned = true;
item.scanDate = new Date() //
@ -423,8 +422,8 @@
item.handledBatch = result.data.batch;
item.handledLot = result.data.lot;
item.defaultHandleQty = result.data.qty>item.recommendQty?item.recommendQty:result.data.qty;
item.handledQty = result.data.qty>item.recommendQty?item.recommendQty:result.data.qty;
item.defaultHandleQty = result.data.qty > item.recommendQty ? item.recommendQty : result.data.qty;
item.handledQty = result.data.qty > item.recommendQty ? item.recommendQty : result.data.qty;
item.handledFromLocationCode = "";
item.handledFromLocationArea = "";
item.handledFromLocationGroup = "";
@ -470,7 +469,7 @@
let params = {
id: this.id
};
takeIssueJob(params)
takeUnProduceReturnJob(params)
.then(res => {
callback(true);
})
@ -481,46 +480,18 @@
},
submit() {
let that = this;
if (that.datacontent.details.length === 0) {
this.showMessage('该任务没有选择的零件');
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
let checkItems = that.details.filter(r => r.scaned === true);
if (checkItems.length < that.details.length) {
showConfirmMsg('还有未扫描的零件,是否提交?', confirm => {
if (confirm) {
that.finsh();
}
});
} else {
that.finsh();
if (!this.locationInfo) {
this.showMessage('请先扫描目标库位');
return;
}
this.finsh();
},
//
handledPackingCode() {
let that = this;
let items = this.details.filter(r => {
return r.scaned && (r.handledPackingCode === null || r.handledPackingCode === '')
})
if (items.length > 0) {
let packingCodes = '';
items.forEach(r => {
packingCodes += r.recommendPackingCode + ','
})
showConfirmMsg('以下箱码对应的实际箱码为空,是否要继续退料?【' + packingCodes + "】", confirm => {
if (confirm) {
that.finsh();
} else {
that.clearScanLocation();
}
});
} else {
that.finsh();
}
},
finsh() {
let that = this;
@ -532,11 +503,23 @@
that.datacontent.completeUserName = localStorage.getItem('userName_CN')
that.datacontent.completeTime = getCurrDateTime();
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN;
.userName_CN;
//
that.details.forEach(res => {
res.recommendToLocationCode = this.locationInfo.code
res.recommendToLocationArea = this.locationInfo.areaCode
res.recommendToLocationGroup = this.locationInfo.locationGroupCode
res.recommendToLocationErpCode = this.locationInfo.erpLocationCode
res.handledToLocationCode =this.locationInfo.code
res.handledToLocationArea=this.locationInfo.areaCode
res.handledToLocationGroup =this.locationInfo.locationGroupCode
res.handledToLocationErpCode =this.locationInfo.erpLocationCode
})
that.datacontent.details = that.details;
let params = JSON.stringify(that.datacontent);
let params = JSON.stringify(that.details);
console.log("提交", params)
finshUnProduceReturnJob(that.id, params)
finshUnProduceReturnJob(that.id,this.datacontent.number,localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN, params)
.then(res => {
uni.hideLoading();
if (res != null) {
@ -600,9 +583,6 @@
}
},
closeScanMessage() {
this.scanPopupGetFocus();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
@ -630,12 +610,14 @@
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('退料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
} else if (value > item.defaultHandleQty) {
item.handledQty = item.defaultHandleQty
this.scanCount = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
} else if (value > this.datacontent.qty) {
this.scanCount = this.datacontent.qty
this.showMessage("实际退料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
}else {
this.scanCount=value;
}
},
}
@ -643,4 +625,4 @@
</script>
<style scoped lang="scss">
</style>
</style>

2
fe/PDA/pages/task/unProduceReturnWip.vue

@ -147,7 +147,7 @@
openDetail(item) {
uni.navigateTo({
url: './unProduceReturnWipDetail?id=' + item.id
url: './unProduceReturnWipDetail?id=' + item.id+ '&jobStatus=' + item.jobStatus
});
},

469
fe/PDA/pages/task/unProduceReturnWipDetail.vue

@ -3,89 +3,64 @@
<page-meta root-font-size="16px"></page-meta>
<view class="">
<view class="top_card">
<com-job-scan-detail :jobContent="datacontent" :allCount="allCount" :scanCount="scanCount">
</com-job-scan-detail>
<comJobUnScanDetail :jobContent="datacontent" :scanCount="scanCount">
</comJobUnScanDetail>
</view>
<scroll-view scroll-y="true" @scrolltoupper="upper" @scrolltolower="lower" @scroll="scroll"
class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<!-- <uni-th width="90"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="100" align="center">实际</uni-th> -->
<uni-th width="50"></uni-th>
<uni-th width="100" align="center">推荐</uni-th>
<uni-th width="140" align="center">实际</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">目标库位</uni-th>
<uni-th width="100" align="center">
<view class="text_black">{{ item.recommendToLocationCode }}</view>
</uni-th>
<uni-th width="140">
<view class="" v-if="item.scaned"
style="display: flex; width: 100%; align-items: center; justify-content: center;">
<view class="text_black">
{{ item.handledToLocationCode }}
</view>
<view class="" style="margin-left: 20rpx;">
<button size="mini" type="primary"
@click="showLocation(item)">扫描库位</button>
</view>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="100" align="center">
<text class="text_black">{{item.recommendQty}}</text>
<text class="text_black" v-if="item.uom!=''">({{item.uom}})</text>
</uni-th>
<uni-th width="140" align="center">
<view v-if="item.scaned"
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.handledQty"
:max="99999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text class="text_black" v-if="item.uom!=''">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
</uni-table>
<view class="" style="margin-bottom:120rpx">
<view class="detail-list margin_top" v-for="(item, index) in details" :key="item.id">
<uni-swipe-action>
<uni-swipe-action-item :right-options="options" :auto-close="false"
@click="swipeClick($event,item,index)" style='background-color: #ffffff;'>
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
<view class="tit_ljh">{{ item.itemCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.itemName }}</view>
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;" emptyText="">
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="0" align="center">
</uni-th>
<uni-th width="360" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index"
v-model="item.handledQty" :max="99999" :min="0"
style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
<text v-if="false" class="text_black">({{item.uom}})</text>
</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
</view>
</view>
</view>
<view v-if="item.scaned" class="choose_marked_count"
style="background-color: #5FCB94; opacity: 0.65">
<view class="" style="background-color: #5FCB94; width: 200rpx;height: 300rpx;">
;
</view>
<!-- <image src="@/static/image_marked.svg"></image> -->
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</scroll-view>
<view class="uni-flex uni-row new_btn_bot">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
<view class="new_bot_box">
<win-collapse-location ref='comCollapseLocation' @getLocationCode='getToLocation' @clear='clearLocation'>
</win-collapse-location>
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</view>
<com-balance ref='issueitems' @selectedItem='selectedBalanceItem'></com-balance>
<win-scan-button @goScan='openScanPopup' title="单件码"></win-scan-button>
@ -96,20 +71,21 @@
<win-scan-by-code ref="scanPopupItem" title='ERP料号' @getScanCode='getScanCode'>
</win-scan-by-code>
<com-balance ref="balanceItems" @selectedItem='selectedBalanceItem'></com-balance>
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" />
<wz-select-popup ref="wzSelectPopup" @select="selectCheckbox" />
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()'
@afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage"></com-message>
@afterCloseScanMessage='closeScanMessage' @afterClose="closeScanMessage"></com-message>
</view>
</template>
<script>
import {
getUnProduceReturnDetail,
takeIssueJob,
cancelTakeIssueJob,
takeUnProduceReturnJob,
cancelTakeUnProduceReturnJob,
finshUnProduceReturnJob,
getitems,
getItemCodeByLike
getItemCodeByLike,
locations
} from '@/api/index.js';
import {
getJobStatuStyle,
@ -119,9 +95,12 @@
compareDesc,
compareStr,
getCurrDateTime,
getCurrDateTimeAndT,
navigateBack,
scanSuccessAudio,
scanFailedAudio
scanFailedAudio,
getRemoveOption,
guid
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
@ -135,6 +114,8 @@
import winScanByProductCode from '@/mycomponents/wincom/winScanByProductCode.vue'
import winScanLocationCode from '@/mycomponents/wincom/winScanLocationCode.vue';
import winScanByCode from '@/mycomponents/wincom/winScanByCode.vue'
import comJobUnScanDetail from '@/mycomponents/comjob/comJobUnScanDetail.vue'
import winCollapseLocation from '@/mycomponents/wincom/winCollapseLocation.vue'
export default {
components: {
@ -149,13 +130,15 @@
comNumberBox,
winScanByProductCode,
winScanLocationCode,
winScanByCode
winScanByCode,
comJobUnScanDetail,
winCollapseLocation
},
data() {
return {
id: "",
datacontent: {},
details: {},
details: [],
toLocation: '',
ispending: false,
balancesItem: null,
@ -168,8 +151,13 @@
names: [],
values: [],
origin: []
}
},
options: [],
locationInfo: null,
jobStatus: "",
}
},
filters: {
statusStyle: function(val) {
@ -184,14 +172,14 @@
},
onLoad(param) {
this.id = param.id;
// if (param.jobStatus == 1) {
// this.receive((callback => {
// this.getDetail();
// }));
// } else {
// this.getDetail();
// }
this.getDetail();
this.options = getRemoveOption();
if (param.jobStatus == 1) {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
},
onReady() {},
//
@ -204,12 +192,20 @@
},
//
onBackPress(e) {
//
// cancelTakeIssueJob(this.id)
// .then(res => {})
// .catch(err => {
// this.showMessage(err.message);
// });
//
if (e.from == 'backbutton') {
if (this.jobStatus == 2) {
//
cancelTakeUnProduceReturnJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
mounted() {
uni.setNavigationBarColor({
@ -223,17 +219,6 @@
this.$refs.location.openScanPopup()
},
getToLocation(locationInfo) {
if(this.currentItem.recommendToLocationCode!=locationInfo.code){
this.showMessage("扫描库位["+locationInfo.code+"]与推荐目标库位["+this.currentItem.recommendToLocationCode+"]不一致")
return;
}
this.currentItem.handledToLocationCode = locationInfo.code;
this.currentItem.handledToLocationArea = locationInfo.areaCode
this.currentItem.handledToLocationGroup = locationInfo.locationGroupCode
this.currentItem.handledToLocationErpCode = locationInfo.erpLocationCode
this.currentItem.handledToWarehouseCode = locationInfo.warehouseCode
},
openScanPopup() {
// if (this.allCount === this.scanCount) {
@ -245,7 +230,7 @@
openItemScanPopup() {
this.$refs.scanPopupItem.openScanPopup();
},
queryItemCode(){
queryItemCode() {
this.$refs.wzSelectPopup.open({
mode: 'radio', //radio checkbox
// dataList:[], //dataList使proxyConfig
@ -262,21 +247,21 @@
value: 'code'
}
})
},
reqGetList(data) {
let params = {
pageSize: data.pageSize,
pageIndex: data.pageIndex,
itemCode: data.searchValue,
};
return getItemCodeByLike(data.searchValue,data.pageIndex,data.pageSize);
return getItemCodeByLike(data.searchValue, data.pageIndex, data.pageSize);
},
selectCheckbox(mode, result){
this.getScanResult(result,false)
selectCheckbox(mode, result) {
this.getScanResult(result, false)
},
//
getDetail() {
@ -296,27 +281,37 @@
uni.hideLoading();
console.log('item', item);
that.datacontent = item;
that.details = item.details;
if (that.details != null) {
that.details.forEach(
r => {
r.scaned = false;
r.scanDate = new Date()
}
);
that.ispending = item.jobStatus === 2;
// if (that.toLocation === '') {
// that.toLocation = item.details[0].requestLocationCode;
// }
this.allCount = that.details.length;
this.scanCount = 0;
}
that.jobStatus = item.jobStatus;
that.scanCount = 0
})
.catch(err => {
uni.hideLoading();
this.showMessage('未查找到详细信息')
});
},
swipeClick(e, item, index) {
let {
content
} = e;
if (content.text === '移除') {
uni.showModal({
title: '提示',
content: '是否移除选择的行?',
success: res => {
if (res.confirm) {
this.details.splice(index, 1)
this.scanCount = 0;
var tempQty =Number(this.datacontent.qty)/Number(this.details.length)
this.details.forEach(res => {
res.handledQty =tempQty
this.scanCount += res.handledQty
})
}
}
});
}
},
getScanCode(code) {
if (code == "") {
@ -326,10 +321,10 @@
getitems(code).then((res) => {
uni.hideLoading();
if (res) {
var result ={
itemCode:res.code
var result = {
itemCode: res.code
}
this.getScanResult(result,false)
this.getScanResult(result, false)
} else {
scanFailedAudio()
this.showMessage('未查找到ERP料号【' + code + '】');
@ -342,53 +337,113 @@
},
getScanResult(result,isMesCode=true) {
getScanResult(result, isMesCode = true) {
// AH240321AM0153 AH240321AM0198 AH240321AM0199
let item = this.details.find(r => {
return r.itemCode == result.itemCode
});
if (item == undefined) {
if(isMesCode){
scanFailedAudio()
this.showMessage('在任务详情中,单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
}else {
this.showMessage('在任务详情中,没有找到ERP料号[' + result.itemCode+"]的信息,请重新扫描");
if (result.itemCode != this.datacontent.itemCode) {
if (isMesCode) {
this.showMessage('单件码【' + result.scanCode + '】所对应的ERP料号与任务中的ERP料号不一致,请重新扫描');
} else {
this.showMessage('没有找到ERP料号[' + result.itemCode + "]的信息,请重新扫描");
}
return;
}
if (item.scaned) {
if(isMesCode){
scanFailedAudio()
let scanItem = this.details.find(r => r.itemCode === result.itemCode)
//
if (scanItem) {
if (isMesCode) {
this.showMessage('单件码[' + result.scanCode + "]已经扫描")
}else {
} else {
this.showMessage('ERP料号[' + result.itemCode + "]已经扫描")
}
} else {
scanSuccessAudio()
item.scaned = true;
item.scanDate = new Date()
this.details.sort(compareDesc('scanDate'));
item.handledQty = item.recommendQty;
this.calcScanCount()
var addItem = {
itemCode: result.itemCode,
itemName: this.datacontent.itemName,
itemDesc1: this.datacontent.itemDesc1,
handledQty: Number(this.datacontent.qty)
}
this.setParam(addItem, result)
this.details.push(addItem)
var tempQty = Number(this.datacontent.qty) / Number(this.details.length)
this.scanCount = 0;
this.details.forEach(res => {
res.handledQty = tempQty
this.scanCount += res.handledQty
})
this.$forceUpdate()
}
},
qtyChanged(value, item, index) {
if (value == 0) {
this.showMessage('退料数量必须大于0')
item.handledQty = item.recommendQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return;
setParam(item, result) {
item.id = guid(),
item.creationTime = getCurrDateTimeAndT()
item.creatorId = guid()
item.lastModificationTime = getCurrDateTimeAndT()
item.lastModifierId = guid()
item.masterID = this.datacontent.id
item.number = this.datacontent.number
item.remark = ""
item.itemName = result.itemName
item.itemDesc1 = result.itemDesc1
item.itemDesc2 = result.itemDesc2
item.itemCode = result.itemCode
item.stdPackQty = result.stdPackQty
item.status = 2
item.recommendContainerCode = ""
item.recommendPackingCode = ""
item.recommendSupplierBatch = ""
item.recommendArriveDate = getCurrDateTimeAndT()
item.recommendProduceDate = getCurrDateTimeAndT()
item.recommendExpireDate = getCurrDateTimeAndT()
item.recommendLot = ""
item.recommendToLocationCode = ""
item.recommendToLocationArea = ""
item.recommendToLocationGroup = ""
item.recommendToLocationErpCode = ""
item.recommendToWarehouseCode = ""
item.recommendQty = item.handledQty
item.uom = result.uom
item.handledContainerCode = ""
item.handledPackingCode = ""
item.handledSupplierBatch = ""
item.handledArriveDate = getCurrDateTimeAndT()
item.handledProduceDate = getCurrDateTimeAndT()
item.handledExpireDate = getCurrDateTimeAndT()
item.handledLot = ""
item.handledToLocationCode = ""
item.handledToLocationArea = ""
item.handledToLocationGroup = ""
item.handledToLocationErpCode = ""
item.handledToWarehouseCode = ""
item.handledQty = item.handledQty
item.extraProperties = {
additionalProp1: "",
additionalProp2: "",
additionalProp3: ""
}
if (value > item.recommendQty) {
},
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('退料数量不能小于或等于0')
this.scanCount = this.datacontent.qty
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
} else if (value > this.datacontent.qty) {
this.scanCount = this.datacontent.qty
this.showMessage("实际退料数量不能大于申请数量")
this.$refs['comNumberBox_' + index][0].setValue(item.recommendQty);
return;
this.$refs['comNumberBox_' + index][0].setValue(this.scanCount);
} else {
this.scanCount = value;
}
},
@ -398,7 +453,7 @@
let params = {
id: this.id
};
takeIssueJob(params)
takeUnProduceReturnJob(params)
.then(res => {
callback(true);
})
@ -409,19 +464,15 @@
},
submit() {
if (this.datacontent.details.length === 0) {
this.showMessage('该任务没有选择的零件');
if (this.details.length == 0) {
this.showMessage('扫描列表为0,请先扫描');
return;
}
let items = this.details.filter(r => {
return r.scaned && r.handledQty != 0 && r.handledToLocationCode != null
})
if (items.length == this.details.length) {
this.finsh();
} else {
this.showMessage("还有未扫描的单件码或库位")
if (!this.locationInfo) {
this.showMessage('请先扫描目标库位');
return;
}
this.finsh();
},
@ -432,26 +483,21 @@
mask: true
});
that.details.forEach(res => {
res.recommendToLocationCode = this.locationInfo.code
res.recommendToLocationArea = this.locationInfo.areaCode
res.recommendToLocationGroup = this.locationInfo.locationGroupCode
res.recommendToLocationErpCode = this.locationInfo.erpLocationCode
res.recommendContainerCode = ""
res.handledContainerCode = ""
res.recommendPackingCode = ""
res.handledPackingCode = ""
res.recommendSupplierBatch = ""
res.recommendLot = ""
res.handledSupplierBatch = ""
res.handledLot = ""
res.handledToLocationCode = this.locationInfo.code
res.handledToLocationArea = this.locationInfo.areaCode
res.handledToLocationGroup = this.locationInfo.locationGroupCode
res.handledToLocationErpCode = this.locationInfo.erpLocationCode
})
that.datacontent.completeUserId = localStorage.getItem('userId')
that.datacontent.completeUserName = localStorage.getItem('userName_CN')
that.datacontent.completeTime = getCurrDateTime();
that.datacontent.worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage
.userName_CN;
that.datacontent.details = that.details;
let params = JSON.stringify(that.datacontent);
let params = JSON.stringify(that.details);
var worker = localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN
console.log("提交", params);
finshUnProduceReturnJob(that.id, params)
finshUnProduceReturnJob(that.id, this.datacontent.number, worker, params)
.then(res => {
uni.hideLoading();
if (res != null) {
@ -495,10 +541,6 @@
this.$refs.scanPopupItem.getfocus();
},
calcScanCount() {
this.scanCount = this.details.filter(r => r.scaned === true).length;
this.closeScanPopup();
},
showCommitSuccessMessage() {
this.$refs.comMessage.showCommitSuccess();
@ -509,13 +551,44 @@
uni.hideLoading();
},
closeScanPopup() {
if (this.allCount == this.scanCount) {
this.$refs.scanPackPopup.closeScanPopup();
this.$refs.scanPopupItem.closeScanPopup();
getToLocation(code) {
if (code == '') {
this.showMessage('目标库位不能为空');
return;
}
uni.showLoading({
title: "扫描中",
mask: true
});
let that = this;
locations(code).then(res => {
if (res == null) {
scanFailedAudio()
that.showMessage('目标库位【' + code + '】不存在');
this.$refs.comCollapseLocation.clearLocation();
} else {
if (that.datacontent.fromErpLocationCode != res.erpLocationCode) {
scanFailedAudio()
that.showMessage('目标库位的ERP储位【' + res.erpLocationCode + '】与【' +
this.datacontent.fromErpLocationCode +
'】不是同一ERP储位,请重新扫描');
this.$refs.comCollapseLocation.clearLocation();
} else {
scanSuccessAudio()
this.locationInfo = res
}
}
uni.hideLoading();
}).catch(err => {
scanFailedAudio()
that.locationInfo = null;
that.showMessage(err.message);
uni.hideLoading();
})
},
}
}
</script>

Loading…
Cancel
Save