Browse Source

上拉加载更多

hella_online_20240829
yufei0306 6 months ago
parent
commit
6b89f51a0b
  1. 137
      src/pages/purchaseReceipt/job/receiptJob.vue

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

@ -82,18 +82,18 @@
},
props: {
operation: "receipt" ,//reject
isShowAsn:{
type: Boolean,
default: true
},
isShowJob:{
type: Boolean,
default: true
},
scanTitle:{
type: String,
default: '箱标签'
operation: "receipt", //reject
isShowAsn: {
type: Boolean,
default: true
},
isShowJob: {
type: Boolean,
default: true
},
scanTitle: {
type: String,
default: '箱标签'
}
},
@ -136,10 +136,17 @@
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
this.refresh();
},
methods: {
onReach() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
refresh() {
this.getList('refresh');
},
@ -341,65 +348,65 @@
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, item.packingNumber);
},
getScanResult(result) {
getScanResult(result) {
try {
let filters = []
if(result.label.barType=="BarCode"){
// ASN
filters = [{
column: "asn_number",
action: "==",
value: result.label.code
}]
}else{
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
// }
]
}
let filters = []
if (result.label.barType == "BarCode") {
// ASN
filters = [{
column: "asn_number",
action: "==",
value: result.label.code
}]
} else {
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 => {
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item=>{
if(!list.find(subItem=>subItem.title==item.title)){
list.push(item)
}
})
if (resultList.length > 0) {
resultList.forEach(item => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item => {
if (!list.find(subItem => subItem.title == item.title)) {
list.push(item)
}
})
console.log('list', list)
if (list.length > 1) {
this.$refs.jobList.openList(list)

Loading…
Cancel
Save