Browse Source

发料任务跳转到详情

hella_online_20240829
lijuncheng 5 months ago
parent
commit
bd90f6eb94
  1. 4
      src/mycomponents/jobList/jobList.vue
  2. 1
      src/mycomponents/scan/winComScan.vue
  3. 4
      src/pages/issue/coms/comScanIssuePack.vue
  4. 17
      src/pages/issue/job/issueDetail.vue
  5. 15
      src/pages/issue/job/issueJob.vue

4
src/mycomponents/jobList/jobList.vue

@ -38,10 +38,10 @@ import { onShow } from '@dcloudio/uni-app';
methods:{ methods:{
openList(list){ openList(list){
this.list = list this.list = list
this.$refs.listPopup.open('center') this.$refs.listPopup.open('center')
}, },
selectItem(item,index){ selectItem(item,index){
this.$refs.listPopup.close();
this.$emit("selectItem", item); this.$emit("selectItem", item);
} }
} }
@ -55,7 +55,7 @@ import { onShow } from '@dcloudio/uni-app';
align-items: center; align-items: center;
.list{ .list{
width: 80%; width: 80%;
max-height:80vh; max-height:50vh;
overflow-y: auto; overflow-y: auto;
border-radius: 10px !important; border-radius: 10px !important;
.slot-image{ .slot-image{

1
src/mycomponents/scan/winComScan.vue

@ -205,6 +205,7 @@
getLabelInfo(content, this.headerType, callback => { getLabelInfo(content, this.headerType, callback => {
// uni.hideLoading(); // uni.hideLoading();
let scanResult = callback; let scanResult = callback;
scanResult.scanMessage=content
if (scanResult.success) { if (scanResult.success) {
that.clear(); that.clear();
// that.getfocus();// // that.getfocus();//

4
src/pages/issue/coms/comScanIssuePack.vue

@ -173,7 +173,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getDetailEditRemoveOption();
}, },
methods: { methods: {
openScanPopupForJobSimulate(content, jobcontent) { openScanPopupForJobSimulate(content, jobcontent,scanMessage) {
this.issueRecord = []; this.issueRecord = [];
this.dataContent = content; this.dataContent = content;
this.jobContent = jobcontent; this.jobContent = jobcontent;
@ -187,7 +187,7 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
if(timer){ if(timer){
clearTimeout(timer) clearTimeout(timer)
} }
this.$refs.comscansimulate.setItemCodeSimulate(item.copyContent) this.$refs.comscansimulate.setItemCodeSimulate(scanMessage)
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, 500) }, 500)
}, },

17
src/pages/issue/job/issueDetail.vue

@ -97,7 +97,7 @@
detailOptions: [], detailOptions: [],
scanOptions: [], scanOptions: [],
jobStatus: "", jobStatus: "",
scanedPackingNumber: '' scanMessage: ''
}; };
}, },
@ -107,7 +107,7 @@
onLoad(option) { onLoad(option) {
this.id = option.id; this.id = option.id;
this.scanedPackingNumber = option.scaned || ''; this.scanMessage = option.scanMessage || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -198,6 +198,12 @@
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
//
if(this.scanMessage){
this.openScanPopupSimulate(this.scanMessage);
}
setTimeout(r => { setTimeout(r => {
that.resizeCollapse(); that.resizeCollapse();
}, 100) }, 100)
@ -435,6 +441,7 @@
}, },
afterScan() { afterScan() {
this.resizeCollapse();
this.detailSource.forEach(detail => { this.detailSource.forEach(detail => {
let s = ''; let s = '';
detail.Items.forEach(item => { detail.Items.forEach(item => {
@ -520,9 +527,9 @@
this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent); this.$refs.comScanIssuePack.openScanPopup(this.detailSource, this.jobContent);
}, },
// openScanPopupSimulate(){ openScanPopupSimulate(scanMessage){
// this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent); this.$refs.comScanIssuePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent,scanMessage);
// }, },
closeScanPopup() { closeScanPopup() {
this.updateCommitBtn(); this.updateCommitBtn();

15
src/pages/issue/job/issueJob.vue

@ -21,7 +21,7 @@
<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="false"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob> <winScanPackJob ref="scanPopup" @getResult='getScanResult' ></winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -232,10 +232,10 @@
}, },
openJobDetail(item, packingNumber = '') { openJobDetail(item, scanMessage = '') {
uni.navigateTo({ uni.navigateTo({
url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scaned=' + url: './issueDetail?id=' + item.masterId + '&status=' + item.status+'&scanMessage=' +
packingNumber scanMessage
}); });
}, },
@ -249,7 +249,7 @@
selectItem(item) { selectItem(item) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item,item.packingNumber); this.openJobDetail(item,this.scanMessage);
}, },
swipeClick(e, dataContent) { swipeClick(e, dataContent) {
@ -371,6 +371,7 @@
sort: 'createTime', sort: 'createTime',
by: 'asc' by: 'asc'
}).then(res => { }).then(res => {
this.scanMessage =result.scanMessage
let resultList = res.data.list; let resultList = res.data.list;
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach(item => { resultList.forEach(item => {
@ -386,10 +387,10 @@
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list) this.$refs.jobList.openList(list)
} else { } else {
this.selectItem(list[0]) this.selectItem(list[0],scanMessage)
} }
} else { } else {
this.showMessage('未查找到任务') this.showMessage("物料号+["result.label.itemCode+"]批次["+result.label.batch+']未查找到任务')
} }
}).catch(error => { }).catch(error => {
this.showMessage(error) this.showMessage(error)

Loading…
Cancel
Save