|
|
@ -56,7 +56,9 @@ |
|
|
|
import putawayJobListPopup from '@/pages/putaway/coms/putawayJobListPopup.vue' |
|
|
|
import putawayInfoPopup from '@/pages/putaway/coms/putawayInfoPopup.vue' |
|
|
|
import winScanPackJob from "@/mycomponents/scan/winScanPackJob.vue" |
|
|
|
import { Exception } from 'sass'; |
|
|
|
import { |
|
|
|
Exception |
|
|
|
} from 'sass'; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Putaway', |
|
|
@ -83,18 +85,18 @@ import { Exception } from 'sass'; |
|
|
|
status: '1,2', //待处理 、进行中 |
|
|
|
detailOptions: [], |
|
|
|
detailGiveupOptions: [], |
|
|
|
title:'', |
|
|
|
scanMessage:"" |
|
|
|
title: '', |
|
|
|
scanMessage: "" |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
onLoad(option){ |
|
|
|
|
|
|
|
onLoad(option) { |
|
|
|
this.title = option.title |
|
|
|
}, |
|
|
|
|
|
|
|
onShow() { |
|
|
|
this.getList('refresh'); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
onReady() { |
|
|
@ -179,7 +181,7 @@ import { Exception } from 'sass'; |
|
|
|
|
|
|
|
var list = res.data.list; |
|
|
|
this.totalCount = res.data.total |
|
|
|
updateTitle(this.title+"(" + this.totalCount + ")"); |
|
|
|
updateTitle(this.title + "(" + this.totalCount + ")"); |
|
|
|
this.loadingType = "loadmore"; |
|
|
|
if (list == null || list.length == 0) { |
|
|
|
this.loadingType = "nomore"; |
|
|
@ -201,9 +203,9 @@ import { Exception } from 'sass'; |
|
|
|
|
|
|
|
openJobDetail(item) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status + '&title='+this.title |
|
|
|
url: './putawayDetail?id=' + item.masterId + '&status=' + item.status + '&title=' + this.title |
|
|
|
}); |
|
|
|
this.scanMessage="" |
|
|
|
this.scanMessage = "" |
|
|
|
}, |
|
|
|
|
|
|
|
showItemList(itemList) { |
|
|
@ -279,7 +281,7 @@ import { Exception } from 'sass'; |
|
|
|
action: "==", |
|
|
|
value: code |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
filters.push({ |
|
|
|
column: "accept_user_id", |
|
|
|
action: "==", |
|
|
@ -318,27 +320,27 @@ import { Exception } from 'sass'; |
|
|
|
selectItem(item) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
uni.navigateTo({ |
|
|
|
url: './putawayDetail?id=' |
|
|
|
+ item.masterId |
|
|
|
+ '&status=' + item.status |
|
|
|
+'&scaned='+item.packingNumber |
|
|
|
+ '&title='+this.title |
|
|
|
+"&scanMessage="+this.scanMessage |
|
|
|
url: './putawayDetail?id=' + |
|
|
|
item.masterId + |
|
|
|
'&status=' + item.status + |
|
|
|
'&scaned=' + item.packingNumber + |
|
|
|
'&title=' + this.title + |
|
|
|
"&scanMessage=" + this.scanMessage |
|
|
|
}); |
|
|
|
this.scanMessage="" |
|
|
|
this.scanMessage = "" |
|
|
|
}, |
|
|
|
getScanResult(result) { |
|
|
|
try { |
|
|
|
this.scanMessage ="" |
|
|
|
this.scanMessage = "" |
|
|
|
var filters = [{ |
|
|
|
column: "packingNumber", |
|
|
|
action: "==", |
|
|
|
value: result.label.packingNumber |
|
|
|
action: "in", |
|
|
|
value: result.package.number + "," + result.package.parentNumber |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "batch", |
|
|
|
action: "==", |
|
|
|
value: result.label.batch |
|
|
|
value: result.package.batch |
|
|
|
}, |
|
|
|
// { |
|
|
|
// column: "qty", |
|
|
@ -348,12 +350,12 @@ import { Exception } from 'sass'; |
|
|
|
{ |
|
|
|
column: "itemCode", |
|
|
|
action: "==", |
|
|
|
value: result.label.itemCode |
|
|
|
value: result.package.itemCode |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: '1,2,3', |
|
|
|
value: '1,2', |
|
|
|
}, |
|
|
|
// { |
|
|
|
// column: "accept_user_id", |
|
|
@ -371,7 +373,7 @@ import { Exception } from 'sass'; |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 100, |
|
|
|
}).then(res => { |
|
|
|
this.scanMessage =result.scanMessage |
|
|
|
this.scanMessage = result.scanMessage |
|
|
|
let resultList = res.data.list; |
|
|
|
if (resultList.length > 0) { |
|
|
|
resultList.forEach(item => { |
|
|
@ -379,38 +381,40 @@ import { Exception } from 'sass'; |
|
|
|
item.selected = false |
|
|
|
}) |
|
|
|
let list = [] |
|
|
|
resultList.forEach(item=>{ |
|
|
|
if(!list.find(subItem=>subItem.title==item.title)){ |
|
|
|
resultList.forEach(item => { |
|
|
|
if (!list.find(subItem => subItem.title == item.title)) { |
|
|
|
list.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
if(list.length==1){ |
|
|
|
//待处理 |
|
|
|
if(list[0].status==1){ |
|
|
|
this.selectItem(list[0]) |
|
|
|
}else if(list[0].status==2){ |
|
|
|
//进行中 |
|
|
|
if(list[0].acceptUserId==this.$store.state.user.id){ |
|
|
|
this.selectItem(list[0]) |
|
|
|
}else { |
|
|
|
this.showMessage("该任务已经被["+list[0].acceptUserName+"]承接"+"<br>任务号["+list[0].number+"]扫描["+result.scanMessage+"]") |
|
|
|
} |
|
|
|
}else if(list[0].status==3){ |
|
|
|
this.showMessage("该任务已经完成<br>承接人["+list[0].acceptUserName+"]<br>任务号["+list[0].number+"]扫描["+result.scanMessage+"]") |
|
|
|
} |
|
|
|
}else { |
|
|
|
this.showMessage("查询到多条任务<br>"+"扫描["+result.scanMessage+"]") |
|
|
|
if (list.length == 1) { |
|
|
|
//待处理 |
|
|
|
if (list[0].status == 1) { |
|
|
|
this.selectItem(list[0]) |
|
|
|
} else if (list[0].status == 2) { |
|
|
|
//进行中 |
|
|
|
if (list[0].acceptUserId == this.$store.state.user.id) { |
|
|
|
this.selectItem(list[0]) |
|
|
|
} else { |
|
|
|
this.showMessage("该任务已经被[" + list[0].acceptUserName + "]承接" + "<br>任务号[" + |
|
|
|
list[0].number + "]扫描[" + result.scanMessage + "]") |
|
|
|
} |
|
|
|
} else if (list[0].status == 3) { |
|
|
|
this.showMessage("该任务已经完成<br>承接人[" + list[0].acceptUserName + "]<br>任务号[" + |
|
|
|
list[0].number + "]扫描[" + result.scanMessage + "]") |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.showMessage("查询到多条任务<br>" + "扫描[" + result.scanMessage + "]") |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
this.showMessage("未查找到任务<br>"+"扫描["+result.scanMessage+"]") |
|
|
|
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error+"<br>扫描["+result.scanMessage+"]") |
|
|
|
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]") |
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
this.showMessage(e+"<br>扫描["+result.scanMessage+"]") |
|
|
|
this.showMessage(e + "<br>扫描[" + result.scanMessage + "]") |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|