|
@ -19,6 +19,13 @@ |
|
|
|
|
|
|
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> |
|
|
</view> |
|
|
</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> |
|
|
<comMessage ref="comMessage"></comMessage> |
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
@ -32,6 +39,10 @@ |
|
|
goHome, |
|
|
goHome, |
|
|
updateTitle |
|
|
updateTitle |
|
|
} from '@/common/basic.js'; |
|
|
} from '@/common/basic.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
getBusinessType |
|
|
|
|
|
} from '@/common/record.js'; |
|
|
import { |
|
|
import { |
|
|
planRefreshTime |
|
|
planRefreshTime |
|
|
} from '@/common/config.js'; |
|
|
} from '@/common/config.js'; |
|
@ -45,6 +56,9 @@ |
|
|
import jobFilter from '@/mycomponents/job/jobFilter.vue' |
|
|
import jobFilter from '@/mycomponents/job/jobFilter.vue' |
|
|
import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue' |
|
|
import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue' |
|
|
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.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 { |
|
|
export default { |
|
|
name: 'issue', |
|
|
name: 'issue', |
|
@ -52,7 +66,10 @@ |
|
|
comEmptyView, |
|
|
comEmptyView, |
|
|
jobFilter, |
|
|
jobFilter, |
|
|
comOverPackJobCard, |
|
|
comOverPackJobCard, |
|
|
jobInfoPopup |
|
|
jobInfoPopup, |
|
|
|
|
|
winComScanBalance, |
|
|
|
|
|
winScanButton, |
|
|
|
|
|
jobList |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@ -68,7 +85,11 @@ |
|
|
detailOptions: [], |
|
|
detailOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
detailGiveupOptions: [], |
|
|
title:'', |
|
|
title:'', |
|
|
timer:null |
|
|
businessTypeCode: "OverPackage", |
|
|
|
|
|
businessType: null, |
|
|
|
|
|
timer:null, |
|
|
|
|
|
scanMessage:"" |
|
|
|
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -125,6 +146,16 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getBusinessTypeFunc() { |
|
|
|
|
|
getBusinessType(this.businessTypeCode, res => { |
|
|
|
|
|
if (res.success) { |
|
|
|
|
|
this.businessType = res.businessType; |
|
|
|
|
|
this.openScanPopup(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showErrorMessage(res.message) |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
timerRefresh() { |
|
|
timerRefresh() { |
|
|
this.getList('refresh') |
|
|
this.getList('refresh') |
|
|
this.stopRefresh(); |
|
|
this.stopRefresh(); |
|
@ -225,8 +256,8 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openJobDetail(item) { |
|
|
openJobDetail(item,scanMessage = '') { |
|
|
this.getJobInfoByNumber(item.number) |
|
|
this.getJobInfoByNumber(item.number,scanMessage) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
showItemList(itemList) { |
|
|
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; |
|
|
let that = this; |
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中....", |
|
|
title: "加载中....", |
|
@ -367,14 +406,93 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
uni.navigateTo({ |
|
|
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 => { |
|
|
}).catch(error => { |
|
|
uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
that.showMessage(error); |
|
|
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> |
|
|
</script> |
|
|