|
|
@ -19,6 +19,13 @@ |
|
|
|
|
|
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
|
</view> |
|
|
|
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> |
|
|
|
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' |
|
|
|
:isCheckLocationBalance="false" |
|
|
|
:bussinessCode="businessTypeCode"> |
|
|
|
</winComScanBalance> |
|
|
|
<!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob> --> |
|
|
|
<jobList ref="jobList" @selectItem="selectItem"></jobList> |
|
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
|
</view> |
|
|
|
</template> |
|
|
@ -32,6 +39,10 @@ |
|
|
|
goHome, |
|
|
|
updateTitle |
|
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
import { |
|
|
|
getBusinessType |
|
|
|
} from '@/common/record.js'; |
|
|
|
import { |
|
|
|
planRefreshTime |
|
|
|
} from '@/common/config.js'; |
|
|
@ -45,6 +56,9 @@ |
|
|
|
import jobFilter from '@/mycomponents/job/jobFilter.vue' |
|
|
|
import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue' |
|
|
|
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' |
|
|
|
import winScanButton from '@/mycomponents/scan/winScanButton.vue' |
|
|
|
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue' |
|
|
|
import jobList from '@/mycomponents/jobList/jobList.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'issue', |
|
|
@ -52,7 +66,10 @@ |
|
|
|
comEmptyView, |
|
|
|
jobFilter, |
|
|
|
comOverPackJobCard, |
|
|
|
jobInfoPopup |
|
|
|
jobInfoPopup, |
|
|
|
winComScanBalance, |
|
|
|
winScanButton, |
|
|
|
jobList |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -68,7 +85,11 @@ |
|
|
|
detailOptions: [], |
|
|
|
detailGiveupOptions: [], |
|
|
|
title:'', |
|
|
|
timer:null |
|
|
|
businessTypeCode: "OverPackage", |
|
|
|
businessType: null, |
|
|
|
timer:null, |
|
|
|
scanMessage:"" |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
@ -125,6 +146,16 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
getBusinessTypeFunc() { |
|
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
|
if (res.success) { |
|
|
|
this.businessType = res.businessType; |
|
|
|
this.openScanPopup(); |
|
|
|
} else { |
|
|
|
this.showErrorMessage(res.message) |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
timerRefresh() { |
|
|
|
this.getList('refresh') |
|
|
|
this.stopRefresh(); |
|
|
@ -225,8 +256,8 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
openJobDetail(item) { |
|
|
|
this.getJobInfoByNumber(item.number) |
|
|
|
openJobDetail(item,scanMessage = '') { |
|
|
|
this.getJobInfoByNumber(item.number,scanMessage) |
|
|
|
}, |
|
|
|
|
|
|
|
showItemList(itemList) { |
|
|
@ -327,8 +358,16 @@ |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
openScanPopup() { |
|
|
|
if (this.businessType == null) { |
|
|
|
this.getBusinessTypeFunc() |
|
|
|
} else { |
|
|
|
this.$refs.scanPopup.openScanPopup(this.businessType); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
getJobInfoByNumber(number){ |
|
|
|
getJobInfoByNumber(number,scanMessage){ |
|
|
|
console.log("扫描",scanMessage) |
|
|
|
let that = this; |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中....", |
|
|
@ -367,14 +406,93 @@ |
|
|
|
return; |
|
|
|
} |
|
|
|
uni.navigateTo({ |
|
|
|
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title |
|
|
|
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title+'&scanMessage=' + |
|
|
|
scanMessage |
|
|
|
}); |
|
|
|
this.scanMessage="" |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading(); |
|
|
|
that.showMessage(error); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
selectItem(item) { |
|
|
|
this.$refs.scanPopup.closeScanPopup(); |
|
|
|
this.openJobDetail(item, this.scanMessage); |
|
|
|
}, |
|
|
|
|
|
|
|
getScanResult(result) { |
|
|
|
let balance = result.balance; |
|
|
|
if (balance != null) { |
|
|
|
this.scanMessage = "" |
|
|
|
if (!result.label.batch) { |
|
|
|
this.showMessage("批次为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!result.label.itemCode) { |
|
|
|
this.showMessage("物料号为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
try { |
|
|
|
var filters = [{ |
|
|
|
column: "status", |
|
|
|
action: "in", |
|
|
|
value: '1,2' |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "batch", |
|
|
|
action: "==", |
|
|
|
value: result.label.batch |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "itemCode", |
|
|
|
action: "==", |
|
|
|
value: result.label.itemCode |
|
|
|
}, |
|
|
|
{ |
|
|
|
column: "fromLocationCode", |
|
|
|
action: "==", |
|
|
|
value: balance.locationCode |
|
|
|
} |
|
|
|
] |
|
|
|
getOverPageJobList({ |
|
|
|
filters: filters, |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1000, |
|
|
|
sort: 'createTime', |
|
|
|
by: 'asc' |
|
|
|
}).then(res => { |
|
|
|
this.scanMessage = result.scanMessage |
|
|
|
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 (list.length > 0) { |
|
|
|
this.selectItem(list[0]) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch + |
|
|
|
"]物料号[" + result.label.itemCode + "]未查找到任务\n" + "扫描[" + result |
|
|
|
.scanMessage + "]") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
this.showMessage(error + "\n扫描[" + result.scanMessage + "]") |
|
|
|
}) |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
this.showMessage(e.message) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|