Browse Source

上拉加载更多

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

Loading…
Cancel
Save