Browse Source

任务添加判断,修改扫描查询条件

hella_online_20240829
yufei0306 4 months ago
parent
commit
69e6a564cb
  1. 32
      src/pages/productPutaway/job/productPutawayJob.vue
  2. 137
      src/pages/productReceipt/job/productReceiptJob.vue
  3. 32
      src/pages/purchaseReceipt/job/receiptJob.vue

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

@ -210,7 +210,7 @@
}) })
}, },
openJobDetail(item,packingNumber='') { 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 + '&scaned=' + packingNumber .type + '&scaned=' + packingNumber
@ -333,19 +333,21 @@
action: "==", action: "==",
value: result.label.batch value: result.label.batch
}, },
// {
// column: "qty",
// action: "==",
// value: result.label.qty
// },
{ {
column: "qty",
action: "==",
value: result.label.qty
}, {
column: "itemCode", column: "itemCode",
action: "==", action: "==",
value: result.label.itemCode value: result.label.itemCode
}, { },
column: "fromLocationCode", // {
action: "==", // column: "fromLocationCode",
value: result.label.fromLocationCode // action: "==",
} // value: result.label.fromLocationCode
// }
] ]
getProductPutawayJobList({ getProductPutawayJobList({
filters: filters, filters: filters,
@ -358,10 +360,14 @@
item.selected = false item.selected = false
}) })
console.log('list', list) console.log('list', list)
if (list.length > 1) { if (list.length > 0) {
this.$refs.jobList.openList(list) if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
} else { } else {
this.selectItem(list[0]) this.showMessage('未查找到任务')
} }
}).catch(error => { }).catch(error => {
this.showMessage(error) this.showMessage(error)

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

@ -52,8 +52,8 @@
import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue'
import jobList from '@/mycomponents/jobList/jobList.vue' import jobList from '@/mycomponents/jobList/jobList.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue" import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue"
export default { export default {
name: 'receipt', name: 'receipt',
components: { components: {
@ -212,18 +212,21 @@
}) })
}, },
openJobDetail(item,packingNumber='') { openJobDetail(item, packingNumber = '') {
if (this.type == 'predict') { if (this.type == 'predict') {
uni.navigateTo({ uni.navigateTo({
url: './productReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' + packingNumber 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 + '&scaned=' + packingNumber url: './fgProductReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scaned=' + packingNumber
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: './scrapReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' + packingNumber url: './scrapReceiptDetail?id=' + item.masterId + '&status=' + item.status + '&scaned=' +
packingNumber
}); });
} }
}, },
@ -336,66 +339,72 @@
return; return;
} }
this.getList("more"); this.getList("more");
}, },
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
selectItem(item) { selectItem(item) {
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 = [{ var 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", {
action: "==", column: "itemCode",
value: result.label.itemCode action: "==",
}, { value: result.label.itemCode
column: "fromLocationCode", },
action: "==", // {
value: result.label.fromLocationCode // column: "fromLocationCode",
} // action: "==",
] // value: result.label.fromLocationCode
getProductReceiptJobList({ // }
filters: filters, ]
pageNo: 1, getProductReceiptJobList({
pageSize: 100, filters: filters,
}).then(res => { pageNo: 1,
var list = res.data.list; pageSize: 100,
list.forEach(item => { }).then(res => {
item.title = item.number; var list = res.data.list;
item.selected = false list.forEach(item => {
}) item.title = item.number;
console.log('list', list.length) item.selected = false
if (list.length > 1) { })
this.$refs.jobList.openList(list) console.log('list', list.length)
} else { if (list.length > 0) {
this.selectItem(list[0]) if (list.length > 1) {
} this.$refs.jobList.openList(list)
}).catch(error => { } else {
this.showMessage(error) this.selectItem(list[0])
}) }
} else {
} catch (e) { this.showMessage('未查找到任务')
this.showMessage(e.message) }
} }).catch(error => {
this.showMessage(error)
})
} catch (e) {
this.showMessage(e.message)
}
}, },
} }
} }
</script> </script>

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

@ -254,7 +254,7 @@
}) })
}, },
openJobDetail(item,packingNumber='') { openJobDetail(item, packingNumber = '') {
uni.navigateTo({ uni.navigateTo({
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scaned=' + packingNumber .operation + '&scaned=' + packingNumber
@ -342,19 +342,21 @@
action: "==", action: "==",
value: result.label.batch value: result.label.batch
}, },
// {
// column: "qty",
// action: "==",
// value: result.label.qty
// },
{ {
column: "qty",
action: "==",
value: result.label.qty
}, {
column: "itemCode", column: "itemCode",
action: "==", action: "==",
value: result.label.itemCode value: result.label.itemCode
}, { },
column: "fromLocationCode", // {
action: "==", // column: "fromLocationCode",
value: result.label.fromLocationCode // action: "==",
} // value: result.label.fromLocationCode
// }
] ]
getPurchaseReceiptJobList({ getPurchaseReceiptJobList({
filters: filters, filters: filters,
@ -367,10 +369,14 @@
item.selected = false item.selected = false
}) })
console.log('list', list) console.log('list', list)
if (list.length > 1) { if (list.length > 0) {
this.$refs.jobList.openList(list) if (list.length > 1) {
this.$refs.jobList.openList(list)
} else {
this.selectItem(list[0])
}
} else { } else {
this.selectItem(list[0]) this.showMessage('未查找到任务')
} }
}).catch(error => { }).catch(error => {
this.showMessage(error) this.showMessage(error)

Loading…
Cancel
Save