Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_online_20240829
niexiting 4 months ago
parent
commit
14eb1ea494
  1. 68
      src/mycomponents/jobList/jobList.vue
  2. 128
      src/mycomponents/scan/winScanPackJob.vue
  3. 11
      src/pages/productPutaway/job/productPutawayDetail.vue
  4. 75
      src/pages/productPutaway/job/productPutawayJob.vue
  5. 11
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  6. 10
      src/pages/productReceipt/job/productReceiptDetail.vue
  7. 95
      src/pages/productReceipt/job/productReceiptJob.vue
  8. 10
      src/pages/purchaseReceipt/job/receiptDetail.vue
  9. 72
      src/pages/purchaseReceipt/job/receiptJob.vue
  10. 5
      src/pages/putaway/job/putawayDetail.vue
  11. 71
      src/pages/putaway/job/putawayJob.vue

68
src/mycomponents/jobList/jobList.vue

@ -0,0 +1,68 @@
<template>
<view class="wyf">
<uni-popup ref="listPopup" type="dialog">
<view class="container">
<uni-list class="list">
<uni-list-item v-for="(item,index) in list" :title="item.title"
thumb-size="lg" >
<template v-slot:footer>
<!-- <image class="slot-image" src="@/static/logo.png" mode="widthFix" @click="selectItem(item,index)"></image -->
<text class="go" @click="selectItem(item,index)">Go</text>
</template>
</uni-list-item>
</uni-list>
</view>
</uni-popup>
</view>
</template>
<script>
import { onShow } from '@dcloudio/uni-app';
export default {
emits: ["selectItem"],
components: {
},
data() {
return {
list: []
// [{
// title:'',
// selected:false
// }],
}
},
props: {
},
methods:{
openList(list){
this.list = list
this.$refs.listPopup.open('center')
},
selectItem(item,index){
this.$emit("selectItem", item);
}
}
}
</script>
<style lang="scss" scoped>
.container{
display: flex;
justify-content: center;
align-items: center;
.list{
width: 80%;
border-radius: 10px !important;
overflow: hidden;
.slot-image{
width: 40rpx;
}
.go{
color: rgb(60, 156, 255);
}
}
}
</style>

128
src/mycomponents/scan/winScanPackJob.vue

@ -0,0 +1,128 @@
<template>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描{{title}}
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult"
:isShowHistory="isShowHistory" :clearResult="true" :headerType="headerType"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import {
getBalanceByManagementPrecision,
} from '@/common/balance.js';
import {
getBasicLocationByCode,
getPutawayJobList
} from '@/api/request2.js';
import {
getListLocationTypeDesc,
checkDirectoryItemExist,
getDirectoryItemArray,
getLocationTypeName,
getInventoryStatusDesc
} from '@/common/directory.js';
export default {
name: 'winScanPack',
emits: ["getResult", "close", "getCountScanResult"],
components: {
winComScan
},
props: {
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: "HPQ,HMQ"
},
},
data() {
return {
show: false,
}
},
created() {
},
methods: {
//
openScanPopup(){
this.$refs.popup.open('bottom')
},
//
closeScanPopup(content) {
this.$refs.popup.close();
this.$emit("close", '');
},
//
getScanResult(result) {
this.$emit("getResult", result);
},
packGetFocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
packLoseFocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
showMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showMessage(message, callback);
})
},
showErrorMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, callback)
})
},
change(e) {
this.show = e.show
},
selectItem(item,index){
}
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

11
src/pages/productPutaway/job/productPutawayDetail.vue

@ -113,12 +113,14 @@
jobToLocationCode: "", jobToLocationCode: "",
type: "", type: "",
isCheckLocation: false, isCheckLocation: false,
switchCode: "" switchCode: "",
scanedPackingNumber: ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.type = option.type; this.type = option.type;
this.scanedPackingNumber = option.scaned || '';
if (this.type == 'predict') { if (this.type == 'predict') {
this.switchCode = "SemiPutawayLocationCodeValidate" this.switchCode = "SemiPutawayLocationCodeValidate"
updateTitle("预生产上架任务"); updateTitle("预生产上架任务");
@ -197,7 +199,12 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true
})
})
that.isCheckLocation = getSwitchInfoByCode(that.switchCode) that.isCheckLocation = getSwitchInfoByCode(that.switchCode)
if (that.isCheckLocation) { if (that.isCheckLocation) {
that.toLocationCode = "" that.toLocationCode = ""

75
src/pages/productPutaway/job/productPutawayJob.vue

@ -21,6 +21,10 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' :allowNullBalance="true">
</winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -47,14 +51,20 @@
import comProductJobCard from '@/pages/productPutaway/coms/comProductJobCard.vue' import comProductJobCard from '@/pages/productPutaway/coms/comProductJobCard.vue'
import jobListPopup from '@/pages/productPutaway/coms/jobListPopup.vue' import jobListPopup from '@/pages/productPutaway/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productPutaway/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/productPutaway/coms/jobInfoPopup.vue'
import jobList from '@/mycomponents/jobList/jobList.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
export default { export default {
components: { components: {
comEmptyView, comEmptyView,
jobFilter, jobFilter,
comProductJobCard, comProductJobCard,
jobListPopup, jobListPopup,
jobInfoPopup jobInfoPopup,
winScanButton,
winScanPackJob,
jobList
}, },
data() { data() {
return { return {
@ -200,10 +210,10 @@
}) })
}, },
openJobDetail(item) { openJobDetail(item,packingNumber='') {
uni.navigateTo({ uni.navigateTo({
url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item
.type .type + '&scaned=' + packingNumber
}); });
}, },
@ -304,6 +314,63 @@
} }
}); });
}, },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber);
},
getScanResult(result) {
try {
var filters = [{
column: "packingNumber",
action: "==",
value: result.label.packingNumber
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "qty",
action: "==",
value: result.label.qty
}, {
column: "itemCode",
action: "==",
value: result.label.itemCode
}, {
column: "fromLocationCode",
action: "==",
value: result.label.fromLocationCode
}
]
getProductPutawayJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
var list = res.data.list;
list.forEach(item => {
item.title = item.number;
item.selected = false
})
console.log('list', list)
if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
}).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
},
} }
} }
</script> </script>

11
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -135,11 +135,13 @@
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
fgList: [], fgList: [],
itemCode: "" itemCode: "",
scanedPackingNumber: ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -216,6 +218,13 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true
})
})
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');

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

@ -133,12 +133,14 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
managementList: [], managementList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "" jobToLocationCode: "",
scanedPackingNumber: ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -214,6 +216,12 @@
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true
})
})
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }

95
src/pages/productReceipt/job/productReceiptJob.vue

@ -20,6 +20,9 @@
<job-info-popup ref='jobInfoPopup'></job-info-popup> <job-info-popup ref='jobInfoPopup'></job-info-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' :allowNullBalance="true"></winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</view> </view>
@ -47,6 +50,9 @@
import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue' import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue'
import jobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue' import jobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue'
import jobList from '@/mycomponents/jobList/jobList.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
export default { export default {
name: 'receipt', name: 'receipt',
@ -55,7 +61,10 @@
jobFilter, jobFilter,
comProductJobCard, comProductJobCard,
jobListPopup, jobListPopup,
jobInfoPopup jobInfoPopup,
winScanButton,
winScanPackJob,
jobList
}, },
data() { data() {
return { return {
@ -121,7 +130,7 @@
}, },
methods: { methods: {
refresh(){ refresh() {
this.getList('refresh'); this.getList('refresh');
}, },
getList(type) { getList(type) {
@ -172,9 +181,9 @@
this.totalCount = res.data.total this.totalCount = res.data.total
if (this.type == 'predict') { if (this.type == 'predict') {
updateTitle("预生产收货任务(" + this.totalCount + ")"); updateTitle("预生产收货任务(" + this.totalCount + ")");
} else if(this.type == 'assemble'){ } else if (this.type == 'assemble') {
updateTitle("装配收货任务(" + this.totalCount + ")"); updateTitle("装配收货任务(" + this.totalCount + ")");
}else { } else {
updateTitle("报废收货任务(" + this.totalCount + ")"); updateTitle("报废收货任务(" + this.totalCount + ")");
} }
this.loadingType = "loadmore"; this.loadingType = "loadmore";
@ -192,9 +201,9 @@
} }
if (this.type == 'predict') { if (this.type == 'predict') {
updateTitle("预生产收货任务(" + this.totalCount + ")"); updateTitle("预生产收货任务(" + this.totalCount + ")");
} else if(this.type == 'assemble'){ } else if (this.type == 'assemble') {
updateTitle("装配收货任务(" + this.totalCount + ")"); updateTitle("装配收货任务(" + this.totalCount + ")");
}else { } else {
updateTitle("报废收货任务(" + this.totalCount + ")"); updateTitle("报废收货任务(" + this.totalCount + ")");
} }
this.loadingType = ""; this.loadingType = "";
@ -203,18 +212,18 @@
}) })
}, },
openJobDetail(item) { openJobDetail(item,packingNumber='') {
if (this.type == 'predict') { if (this.type == 'predict') {
uni.navigateTo({ uni.navigateTo({
url: './productReceiptDetail?id=' + item.masterId + '&status=' + item.status url: './productReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' + packingNumber
}); });
} else if(this.type == 'assemble'){ } else if (this.type == 'assemble') {
uni.navigateTo({ uni.navigateTo({
url: './fgProductReceiptDetail?id=' + item.masterId + '&status=' + item.status url: './fgProductReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' + packingNumber
}); });
}else { } else {
uni.navigateTo({ uni.navigateTo({
url: './scrapReceiptDetail?id=' + item.masterId + '&status=' + item.status url: './scrapReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' + packingNumber
}); });
} }
}, },
@ -322,13 +331,71 @@
toHome() { toHome() {
goHome() goHome()
}, },
onReach(){ onReach() {
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList("more"); this.getList("more");
} },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item,item.packingNumber);
},
getScanResult(result) {
try {
var filters = [{
column: "packingNumber",
action: "==",
value: result.label.packingNumber
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "qty",
action: "==",
value: result.label.qty
}, {
column: "itemCode",
action: "==",
value: result.label.itemCode
}, {
column: "fromLocationCode",
action: "==",
value: result.label.fromLocationCode
}
]
getProductReceiptJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
var list = res.data.list;
list.forEach(item => {
item.title = item.number;
item.selected = false
})
console.log('list', list.length)
if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
}).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
},
} }
} }
</script> </script>

10
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -125,13 +125,15 @@
managementList: [], managementList: [],
jobStatus: "", jobStatus: "",
isAllReceived: false, isAllReceived: false,
operation: '' operation: '',
scanedPackingNumber: ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
this.operation = option.operation; this.operation = option.operation;
if (this.id != undefined) { if (this.id != undefined) {
// //
@ -213,6 +215,12 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.detailSource = getTreeDataSource(that.subList) that.detailSource = getTreeDataSource(that.subList)
that.detailSource.forEach(r => {
r.subList.forEach(s => {
if (this.scanedPackingNumber && this.scanedPackingNumber == s
.packingNumber) s.scaned = true
})
})
that.isAllReceived = false; that.isAllReceived = false;
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');

72
src/pages/purchaseReceipt/job/receiptJob.vue

@ -19,6 +19,10 @@
<receipt-info-popup ref='jobInfoPopup'></receipt-info-popup> <receipt-info-popup ref='jobInfoPopup'></receipt-info-popup>
<receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup> <receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup>
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' :allowNullBalance="true">
</winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -45,6 +49,9 @@
import comReceiptJobCard from '@/pages/purchaseReceipt/coms/comReceiptJobCard.vue' import comReceiptJobCard from '@/pages/purchaseReceipt/coms/comReceiptJobCard.vue'
import receiptJobListPopup from '@/pages/purchaseReceipt/coms/receiptJobListPopup.vue' import receiptJobListPopup from '@/pages/purchaseReceipt/coms/receiptJobListPopup.vue'
import receiptInfoPopup from '@/pages/purchaseReceipt/coms/receiptInfoPopup.vue' import receiptInfoPopup from '@/pages/purchaseReceipt/coms/receiptInfoPopup.vue'
import jobList from '@/mycomponents/jobList/jobList.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
export default { export default {
name: 'receipt', name: 'receipt',
@ -54,6 +61,9 @@
comReceiptJobCard, comReceiptJobCard,
receiptInfoPopup, receiptInfoPopup,
receiptJobListPopup, receiptJobListPopup,
winScanButton,
winScanPackJob,
jobList
}, },
data() { data() {
return { return {
@ -244,9 +254,10 @@
}) })
}, },
openJobDetail(item) { openJobDetail(item,packingNumber='') {
uni.navigateTo({ uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this.operation url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scaned=' + packingNumber
}); });
}, },
@ -312,6 +323,63 @@
}); });
}, },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber);
},
getScanResult(result) {
try {
var filters = [{
column: "packingNumber",
action: "==",
value: result.label.packingNumber
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "qty",
action: "==",
value: result.label.qty
}, {
column: "itemCode",
action: "==",
value: result.label.itemCode
}, {
column: "fromLocationCode",
action: "==",
value: result.label.fromLocationCode
}
]
getPurchaseReceiptJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
var list = res.data.list;
list.forEach(item => {
item.title = item.number;
item.selected = false
})
console.log('list', list)
if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
}).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
},
} }
} }
</script> </script>

5
src/pages/putaway/job/putawayDetail.vue

@ -107,11 +107,13 @@
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
jobStatus: "", jobStatus: "",
jobToLocationCode: "", jobToLocationCode: "",
isCheckLocation: false isCheckLocation: false,
scanedPackingNumber : ''
}; };
}, },
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -188,6 +190,7 @@
that.detailSource.forEach(r => { that.detailSource.forEach(r => {
r.subList.forEach(s => { r.subList.forEach(s => {
if(this.scanedPackingNumber&&this.scanedPackingNumber==s.packingNumber) s.scaned = true
s.inventoryStatus = s.inspectResult;// s.inventoryStatus = s.inspectResult;//
}) })
}) })

71
src/pages/putaway/job/putawayJob.vue

@ -22,11 +22,18 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' :allowNullBalance="true">
</winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import jobList from '@/mycomponents/jobList/jobList.vue'
import { import {
getPutawayJobList, getPutawayJobList,
@ -42,12 +49,14 @@
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption
} from '@/common/array.js'; } from '@/common/array.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue' import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comPutawayJobCard from '@/pages/putaway/coms/comPutawayJobCard.vue' import comPutawayJobCard from '@/pages/putaway/coms/comPutawayJobCard.vue'
import putawayJobListPopup from '@/pages/putaway/coms/putawayJobListPopup.vue' import putawayJobListPopup from '@/pages/putaway/coms/putawayJobListPopup.vue'
import putawayInfoPopup from '@/pages/putaway/coms/putawayInfoPopup.vue' import putawayInfoPopup from '@/pages/putaway/coms/putawayInfoPopup.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
export default { export default {
name: 'Putaway', name: 'Putaway',
@ -57,6 +66,9 @@
comPutawayJobCard, comPutawayJobCard,
putawayJobListPopup, putawayJobListPopup,
putawayInfoPopup, putawayInfoPopup,
winScanButton,
winScanPackJob,
jobList
}, },
data() { data() {
return { return {
@ -281,6 +293,65 @@
} }
}); });
}, },
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
selectItem(item){
this.$refs.scanPopup.closeScanPopup();
uni.navigateTo({
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' + item.packingNumber
});
},
getScanResult(result) {
try {
var filters = [{
column: "packingNumber",
action: "==",
value: result.label.packingNumber
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "qty",
action: "==",
value: result.label.qty
},{
column: "itemCode",
action: "==",
value: result.label.itemCode
},{
column: "fromLocationCode",
action: "==",
value: result.label.fromLocationCode
}]
getPutawayJobList({
filters: filters,
pageNo: 1,
pageSize: 100,
}).then(res => {
console.log('getPutawayJobList',getPutawayJobList)
var list = res.data.list;
list.forEach(item=>{
item.title = item.number;
item.selected = false
})
console.log('list',list)
if(list.length>1){
this.$refs.jobList.openList(list)
}else{
this.selectItem(list[0])
}
}).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
},
} }
} }
</script> </script>

Loading…
Cancel
Save