Browse Source

采购收货任务--1. 再扫描时最好可以兼容扫描ASN编号和箱标签,扫描任务编号的按钮隐藏掉

hella_online_20240829
yufei0306 6 months ago
parent
commit
62328a3123
  1. 6
      src/mycomponents/job/jobFilter.vue
  2. 7
      src/mycomponents/jobList/jobList.vue
  3. 22
      src/pages/productPutaway/job/productPutawayJob.vue
  4. 19
      src/pages/productReceipt/job/productReceiptJob.vue
  5. 2
      src/pages/purchaseReceipt/job/purchaseReceipt.vue
  6. 100
      src/pages/purchaseReceipt/job/receiptJob.vue
  7. 13
      src/pages/putaway/job/putawayJob.vue

6
src/mycomponents/job/jobFilter.vue

@ -37,7 +37,7 @@
<button class="filter_button" hover-class="filter_button_after" <button class="filter_button" hover-class="filter_button_after"
@click="scanOtherClick">扫描ASN单号</button> @click="scanOtherClick">扫描ASN单号</button>
</view> </view>
<view class="uni-flex u-row-center" style="margin-top: 30rpx;"> <view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowJob">
<button class="filter_button" hover-class="filter_button_after" <button class="filter_button" hover-class="filter_button_after"
@click="scanNumberClick">扫描任务编号</button> @click="scanNumberClick">扫描任务编号</button>
</view> </view>
@ -80,6 +80,10 @@
type: Boolean, type: Boolean,
default: false default: false
}, },
isShowJob:{
type: Boolean,
default: true
},
isShowFromLocationCode:{ isShowFromLocationCode:{
type: Boolean, type: Boolean,
default: false default: false

7
src/mycomponents/jobList/jobList.vue

@ -37,11 +37,8 @@ import { onShow } from '@dcloudio/uni-app';
}, },
methods:{ methods:{
openList(list){ openList(list){
list.forEach(item=>{ this.list = list
if(!this.list.find(subItem=>subItem.title==item.title)){
this.list.push(item)
}
})
this.$refs.listPopup.open('center') this.$refs.listPopup.open('center')
}, },
selectItem(item,index){ selectItem(item,index){

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

@ -353,14 +353,20 @@
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
var list = res.data.list; let resultList = res.data.list;
list.forEach(item => { if (resultList.length > 0) {
item.title = item.number; resultList.forEach(item => {
item.selected = false item.title = item.number;
}) item.selected = false
console.log('list', list) })
if (list.length > 0) { let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
console.log('list', list)
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list) this.$refs.jobList.openList(list)
} else { } else {

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

@ -380,13 +380,18 @@
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
var list = res.data.list; let resultList = res.data.list;
list.forEach(item => { if (resultList.length > 0) {
item.title = item.number; resultList.forEach(item => {
item.selected = false item.title = item.number;
}) item.selected = false
console.log('list', list.length) })
if (list.length > 0) { let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list) this.$refs.jobList.openList(list)
} else { } else {

2
src/pages/purchaseReceipt/job/purchaseReceipt.vue

@ -1,6 +1,6 @@
<template> <template>
<view class=""> <view class="">
<receipt-job ref="receiptjob" operation='receipt'></receipt-job> <receipt-job :isShowAsn="false" :isShowJob="false" ref="receiptjob" operation='receipt'></receipt-job>
</view> </view>
</template> </template>

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

@ -1,7 +1,7 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" :isShowAsn="true" @switchChangeToday="switchChangeToday" <job-filter ref="filter" :isShowAsn="isShowAsn" :isShowJob="isShowJob" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" @onScanAsnNumber="getScanAsnNumber" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" @onScanAsnNumber="getScanAsnNumber"
:checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"> :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask">
</job-filter> </job-filter>
@ -82,7 +82,15 @@
}, },
props: { props: {
operation: "receipt" //reject operation: "receipt" ,//reject
isShowAsn:{
type: Boolean,
default: true
},
isShowJob:{
type: Boolean,
default: true
},
}, },
// onShow() { // onShow() {
@ -330,46 +338,66 @@
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber); this.openJobDetail(item, item.packingNumber);
}, },
getScanResult(result) { getScanResult(result) {
try { try {
var filters = [{ let filters = []
column: "packingNumber", if(result.label.barType=="BarCode"){
action: "==", // ASN
value: result.label.packingNumber filters = [{
}, column: "asn_number",
{ action: "==",
column: "batch", value: result.label.code
action: "==", }]
value: result.label.batch }else{
}, filters = [{
// { column: "packingNumber",
// column: "qty", action: "==",
// action: "==", value: result.label.packingNumber
// value: result.label.qty },
// }, {
{ column: "batch",
column: "itemCode", action: "==",
action: "==", value: result.label.batch
value: result.label.itemCode },
}, // {
// { // column: "qty",
// column: "fromLocationCode", // action: "==",
// action: "==", // value: result.label.qty
// value: result.label.fromLocationCode // },
// } {
] column: "itemCode",
action: "==",
value: result.label.itemCode
},
// {
// column: "fromLocationCode",
// action: "==",
// value: result.label.fromLocationCode
// }
]
}
getPurchaseReceiptJobList({ getPurchaseReceiptJobList({
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
var list = res.data.list; let resultList = res.data.list;
list.forEach(item => { if (resultList.length > 0) {
item.title = item.number; resultList.forEach(item => {
item.selected = false item.title = item.number;
}) item.selected = false
console.log('list', list) })
if (list.length > 0) { let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
console.log('list', list)
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list) this.$refs.jobList.openList(list)
} else { } else {

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

@ -335,13 +335,18 @@
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
console.log('getPutawayJobList', getPutawayJobList) console.log('getPutawayJobList', getPutawayJobList)
var list = res.data.list; let resultList = res.data.list;
if (list.length > 0) { if (resultList.length > 0) {
list.forEach(item => { resultList.forEach(item => {
item.title = item.number; item.title = item.number;
item.selected = false item.selected = false
}) })
console.log('list', list) let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list) this.$refs.jobList.openList(list)
} else { } else {

Loading…
Cancel
Save