diff --git a/src/mycomponents/job/jobFilter.vue b/src/mycomponents/job/jobFilter.vue index 9b1021d2..84e9db14 100644 --- a/src/mycomponents/job/jobFilter.vue +++ b/src/mycomponents/job/jobFilter.vue @@ -58,7 +58,7 @@ --> - + @@ -167,6 +167,14 @@ } return params; }, + reset(){ + this.productionLineCode = '' + this.fromLocationCode = '' + this.itemCode = '' + this.creationTime = '' + this.status = '' + this.query() + }, query() { let params = this.getQueryCondition(); diff --git a/src/pages/deliver/coms/comScanDeliverPack.vue b/src/pages/deliver/coms/comScanDeliverPack.vue index c0e522eb..244a093f 100644 --- a/src/pages/deliver/coms/comScanDeliverPack.vue +++ b/src/pages/deliver/coms/comScanDeliverPack.vue @@ -232,10 +232,11 @@ fromLocationUpdate(fromlocation) { let location = this.fromLocationList.find(r => r == fromlocation) - if (location == undefined) { - this.fromLocationCode = '' - this.showErrorMessage('发货库位【' + fromlocation + '】不存在') - } + // 成品发货任务--同一物料,可以扫描提交不在任务中的库位 + // if (location == undefined) { + this.fromLocationCode = fromlocation + // this.showErrorMessage('发货库位【' + fromlocation + '】不存在') + // } }, onScan(result) { try { @@ -298,13 +299,36 @@ afterGetBalance(label, balance, packageInfo) { + let that = this; try { - let that = this; let itemCode = label.itemCode; let packingCode = label.packingNumber; let lot = label.batch; let item = that.toLocation.Items.find(r => r.itemCode == itemCode); let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode); + // 成品发货任务--同一物料,可以扫描提交不在任务中的库位 + if(!fromLocation){ + fromLocation = { + Batchs:[{ + Recommends:[], + Records: [], + batch: label.batch, + detail:{ + ...packageInfo, + fromLocationCode: balance.locationCode, + }, + handleQty: 0, + packingNumber: label.packingNumber, + qty: label.qty, + uom: label.uom + }], + fromLocationCode: balance.locationCode, + handleQty: 0, + qty: label.qty, + uom: label.uom + } + item.Locations.push(fromLocation) + } if (fromLocation != undefined) { let batch = fromLocation.Batchs.find(r => r.batch == lot); if (batch != undefined) { diff --git a/src/pages/issue/job/issueJob.vue b/src/pages/issue/job/issueJob.vue index b14e36ae..08324259 100644 --- a/src/pages/issue/job/issueJob.vue +++ b/src/pages/issue/job/issueJob.vue @@ -99,7 +99,8 @@ detailCloseOptions: [], title: '', productionLine: "", - fromLocation: "", + fromLocation: "", + filterItemCode: "", businessTypeCode: "Issue", businessType: null, }; @@ -109,7 +110,8 @@ this.getIssueJobByProductionline() }, onShow() { - this.getList('refresh', this.fromLocation, this.productionLine); + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) + }, onReady() { @@ -122,12 +124,13 @@ if (this.loadingType == 'loading' || this.loadingType == 'nomore') { return; } - this.getList('more', this.fromLocation, this.productionLine) + this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) + }, onPullDownRefresh() { - this.getList('refresh', this.fromLocation, this.productionLine) + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) }, //后退按钮 @@ -180,7 +183,7 @@ }) }, - getList(type, fromLocation = '', productionLine = '') { + getList(type, fromLocation = '', productionLine = '',filterItemCode='') { let that = this; uni.showLoading({ title: "加载中­....", @@ -228,8 +231,15 @@ action: "==", value: productionLine }) + } + if(filterItemCode){ + // 物料代码 + filters.push({ + column: "itemCode", + action: "like", + value: filterItemCode + }) } - var params = { filters: filters, pageNo: this.pageNo, @@ -265,7 +275,8 @@ }) }, - getListByFilter(params) { + getListByFilter(params) { + console.log('getListByFilter',params) let that = this; uni.showLoading({ title: "加载中­....", @@ -293,57 +304,69 @@ }) if (params.fromLocationCode) { - // 来源库位 + // 来源库位 + this.fromLocation = params.fromLocationCode filters.push({ column: "fromLocationCode", action: "==", value: params.fromLocationCode }) + }else{ + this.fromLocation = '' } if (params.productionLineCode) { - // 生产线 + // 生产线 + this.productionLine = params.productionLineCode filters.push({ column: "productionLineCode", action: "==", value: params.productionLineCode }) + }else{ + this.productionLine = '' } if (params.itemCode) { - // 生产线 + // 物料代码 + this.filterItemCode = params.itemCode filters.push({ column: "itemCode", action: "like", value: params.itemCode }) + }else{ + this.filterItemCode = '' } var params = { filters: filters, pageNo: 1, pageSize: 100, - } - getIssueJobList(params).then(res => { - uni.hideLoading(); - if (res.data.total == 0) { - that.showMessage('未查找到发料任务'); - } else if (res.data.total == 1) { - that.openJobDetail(res.data.list[0]); - } else { - that.showItemList(res.data.list); - } - }).catch(error => { - - that.showMessage(error) - }) + } + + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) + // getIssueJobList(params).then(res => { + // uni.hideLoading(); + // if (res.data.total == 0) { + // that.showMessage('未查找到发料任务'); + // } else if (res.data.total == 1) { + // that.openJobDetail(res.data.list[0]); + // } else { + // that.showItemList(res.data.list); + // } + // }).catch(error => { + + // that.showMessage(error) + // }) }, fromLocationCode(fromLocation) { this.fromLocation = fromLocation; - this.getList('refresh', this.fromLocation, this.productionLine) + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) + }, productionLineCode(productionLineCode) { this.productionLine = productionLineCode - this.getList('refresh', this.fromLocation, this.productionLine) + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) }, getByAsnNumber(code) { let that = this; @@ -418,7 +441,8 @@ cancleJob(id) { cancleTakeIssueJob(id).then(res => { if (res.data) { - this.getList("refresh", this.fromLocation, this.productionLine) + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) + uni.showToast({ title: "放弃任务成功" }) @@ -454,13 +478,14 @@ switchChangeToday(state, creationTime) { this.checkedToday = state; this.todayTime = creationTime; - this.getList("refresh", this.fromLocation, this.productionLine); + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) + }, switchChangeWait(state, jobStatus) { this.checkedWaitTask = state; this.status = jobStatus; - this.getList("refresh", this.fromLocation, this.productionLine); + this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) }, getScanNumber(code) { diff --git a/src/pages/repleinsh/job/repleinshJob.vue b/src/pages/repleinsh/job/repleinshJob.vue index 8c3ebc2d..ca36f9ab 100644 --- a/src/pages/repleinsh/job/repleinshJob.vue +++ b/src/pages/repleinsh/job/repleinshJob.vue @@ -103,7 +103,9 @@ inInventoryStatus: "", //目标入库库存状态 outInventoryStatus: "", //来源出库库存状态 productionLineCode: "", - productionlineList: [] + productionlineList: [], + fromLocationCode:'', + filterItemCode:'' }; }, onLoad(option) { @@ -144,10 +146,12 @@ if (this.loadingType == 'loading' || this.loadingType == 'nomore') { return; } - this.getList("more"); + this.getList('more', this.fromLocationCode, this.filterItemCode) + }, onPullDownRefresh() { - this.getList('refresh'); + this.getList('refresh', this.fromLocationCode, this.filterItemCode) + }, methods: { @@ -164,7 +168,8 @@ }); }, - getList(type, fromLocationCode = '') { + getList(type, fromLocationCode = '',filterItemCode='') { + let that = this; uni.showLoading({ title: "加载中­....", @@ -205,6 +210,14 @@ value: fromLocationCode }) } + if (filterItemCode != '') { + // 物料代码 + filters.push({ + column: "itemCode", + action: "like", + value: filterItemCode + }) + } var params = { filters: filters, pageNo: this.pageNo, @@ -270,46 +283,55 @@ if (params.fromLocationCode) { // 来源库位 + this.fromLocationCode = params.fromLocationCode filters.push({ column: "fromLocationCode", action: "==", value: params.fromLocationCode }) + }else{ + this.fromLocationCode = '' } if (params.itemCode) { - // 生产线 + // 物料代码 + this.filterItemCode = params.itemCode filters.push({ column: "itemCode", action: "like", value: params.itemCode }) + }else{ + this.filterItemCode = '' } var params = { filters: filters, pageNo: 1, pageSize: 100, } - getRepleinshJobList(params).then(res => { - uni.hideLoading(); - if (res.data.total == 0) { - that.showMessage('未查找到补料任务'); - } else if (res.data.total == 1) { - that.openJobDetail(res.data.list[0]); - } else { - that.showItemList(res.data.list); - } - }).catch(error => { - - that.showMessage(error) - }) + this.getList('refresh', this.fromLocationCode, this.filterItemCode) + + // getRepleinshJobList(params).then(res => { + // uni.hideLoading(); + // if (res.data.total == 0) { + // that.showMessage('未查找到补料任务'); + // } else if (res.data.total == 1) { + // that.openJobDetail(res.data.list[0]); + // } else { + // that.showItemList(res.data.list); + // } + // }).catch(error => { + + // that.showMessage(error) + // }) }, fromLocationCode(fromLocationCode) { console.log('fromLocationCode', fromLocationCode) - this.getList('refresh', fromLocationCode, '') + this.fromLocationCode = fromLocationCode + this.getList('refresh', this.fromLocationCode, this.filterItemCode) }, openJobDetail(item, scanMessage = '') {