diff --git a/common/balance.js b/common/balance.js index 827b4067..8733e89a 100644 --- a/common/balance.js +++ b/common/balance.js @@ -1,4 +1,3 @@ - import { getManagementPrecision, getBalanceByFilter @@ -38,7 +37,7 @@ export function getManagementPrecisions(itemCodes, locationCode, callback) { }) } -export function getBalanceByManagementPrecision(label, locationCode,fromInventoryStatuses, callback) { +export function getBalanceByManagementPrecision(label, locationCode, fromInventoryStatuses, callback) { let result = { list: [], success: true, @@ -53,25 +52,25 @@ export function getBalanceByManagementPrecision(label, locationCode,fromInventor let managementPrecision = res.data[0].ManagementPrecision; switch (managementPrecision) { case 'BY_PACKAGING': - byPacking(label, locationCode,fromInventoryStatuses, res => { + byPacking(label, locationCode, fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); break; case 'BY_BATCH': - byBatch(label, locationCode,fromInventoryStatuses, res => { + byBatch(label, locationCode, fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); break; case 'BY_QUANTITY': - byQuantity(label, locationCode,fromInventoryStatuses, res => { + byQuantity(label, locationCode, fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); break; case 'BY_UNIQUEID': - byUniqueId(label,fromInventoryStatuses, res => { + byUniqueId(label, fromInventoryStatuses, res => { res.managementPrecision = managementPrecision; callback(res); }); @@ -90,7 +89,7 @@ export function getBalanceByManagementPrecision(label, locationCode,fromInventor * @param {Object} locationCode * @param {Object} callback */ -export function byPacking(label, locationCode,fromInventoryStatuses, callback) { +export function byPacking(label, locationCode, fromInventoryStatuses, callback) { let result = { success: true, message: '', @@ -117,14 +116,14 @@ export function byPacking(label, locationCode,fromInventoryStatuses, callback) { action: "==", value: locationCode }) - if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + if (fromInventoryStatuses != null && fromInventoryStatuses != "") { filters.push({ column: "inventoryStatus", action: "in", value: fromInventoryStatuses }) } - + var params = { filters: filters, @@ -157,7 +156,7 @@ export function byPacking(label, locationCode,fromInventoryStatuses, callback) { * @param {Object} locationCode * @param {Object} callback */ -export function byBatch(label, locationCode,fromInventoryStatuses, callback) { +export function byBatch(label, locationCode, fromInventoryStatuses, callback) { var filters = [] filters.push({ column: "itemCode", @@ -174,8 +173,8 @@ export function byBatch(label, locationCode,fromInventoryStatuses, callback) { action: "==", value: locationCode }) - - if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + + if (fromInventoryStatuses != null && fromInventoryStatuses != "") { filters.push({ column: "inventoryStatus", action: "in", @@ -218,7 +217,7 @@ export function byBatch(label, locationCode,fromInventoryStatuses, callback) { * @param {Object} locationCode * @param {Object} callback */ -export function byQuantity(label, locationCode,fromInventoryStatuses, callback) { +export function byQuantity(label, locationCode, fromInventoryStatuses, callback) { let result = { success: true, message: '', @@ -236,8 +235,8 @@ export function byQuantity(label, locationCode,fromInventoryStatuses, callback) action: "==", value: locationCode }) - - if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + + if (fromInventoryStatuses != null && fromInventoryStatuses != "") { filters.push({ column: "inventoryStatus", action: "in", @@ -274,7 +273,7 @@ export function byQuantity(label, locationCode,fromInventoryStatuses, callback) * @param {Object} locationCode * @param {Object} callback */ -export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) { +export function byUniqueId(label, locationCode, fromInventoryStatuses, callback) { let param = { packingNumber: label.packingNumber }; @@ -290,8 +289,8 @@ export function byUniqueId(label, locationCode,fromInventoryStatuses, callback) action: "==", value: label.packingNumber }) - - if(fromInventoryStatuses!=null&&fromInventoryStatuses!=""){ + + if (fromInventoryStatuses != null && fromInventoryStatuses != "") { filters.push({ column: "inventoryStatus", action: "in", diff --git a/mycomponents/qty/balanceQtyEdit.vue b/mycomponents/qty/balanceQtyEdit.vue index ea290cbd..b7b48ba1 100644 --- a/mycomponents/qty/balanceQtyEdit.vue +++ b/mycomponents/qty/balanceQtyEdit.vue @@ -122,7 +122,6 @@ }, methods: { openEditPopup(item, handleQty) { - debugger; this.dataContent = item this.inventoryStatus = this.dataContent.inventoryStatus this.toInventoryStatus = this.dataContent.toInventoryStatus diff --git a/mycomponents/record/recordComDetailCard.vue b/mycomponents/record/recordComDetailCard.vue index 9e6755fc..46780f13 100644 --- a/mycomponents/record/recordComDetailCard.vue +++ b/mycomponents/record/recordComDetailCard.vue @@ -141,7 +141,6 @@ edit(item) { this.editItem = item; - debugger this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty); }, diff --git a/pages/issue/coms/comScanIssuePack.vue b/pages/issue/coms/comScanIssuePack.vue index 0c673d75..77b289cc 100644 --- a/pages/issue/coms/comScanIssuePack.vue +++ b/pages/issue/coms/comScanIssuePack.vue @@ -205,7 +205,6 @@ this.showErrorMessage('发料库位【' + fromlocation + '】不存在') } }, - onScan(result) { try { let that = this; @@ -233,8 +232,7 @@ title: '加载中', mask: true }) - - getBalanceByManagementPrecision(result.label, that.fromLocationCode, balanceRes => { + getBalanceByManagementPrecision(result.label, that.fromLocationCode, "OK", balanceRes => { if (balanceRes.success) { if (balanceRes.data.list.length == 0) { this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录', @@ -359,7 +357,7 @@ inventoryStatus: balance.inventoryStatus, balance: balance, toLocationCode: this.toLocationCode, - supplierCode:label.supplierCode + supplierCode: label.supplierCode } return record; }, @@ -409,7 +407,7 @@ edit(item) { this.editItem = item; // item.balance.balanceQty = item.balance.qty; - item.balance.balanceQty=item.balance.qty; + item.balance.balanceQty = item.balance.qty; this.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty); }, diff --git a/pages/issue/job/issueDetail.vue b/pages/issue/job/issueDetail.vue index 0486cfa6..05c827a7 100644 --- a/pages/issue/job/issueDetail.vue +++ b/pages/issue/job/issueDetail.vue @@ -197,43 +197,36 @@ }); }, - submit() { - //3.如果是按批次先进先出发料提交时如果扫描的箱码不是先进的批次,则报错 - //:请扫描XXX批次,改批次满足先进先出规则。否则可以直接提交 - // var isOutIn = getApp().globalData.feed_configList.filter( - // res => { - // if (res.name == 'feed_isOutIn') { - // return res; - // } - // }); - - uni.showLoading({ - title: '提交中...', - mask: true - }) - - this.submitJob(); - - - // this.dataContent.itemCodeList.forEach(res => { - // if (res.handleQty > res.recommendQty) { - // this.$refs.modal.showConfirmMessageModal('实际数量大于需求数量,是否提交?', confirm => { - // if (confirm) { - // //提交 - // uni.showToast({ - // title: "提交" - // }) - // } - // }) - // } else { - // uni.showToast({ - // title: "扫描的数量" + res.handleQty + "]小于推荐数量[" + res.recommendQty + "]" - // }) - // } - // }) - }, + // submit() { + //3.如果是按批次先进先出发料提交时如果扫描的箱码不是先进的批次,则报错 + //:请扫描XXX批次,改批次满足先进先出规则。否则可以直接提交 + // var isOutIn = getApp().globalData.feed_configList.filter( + // res => { + // if (res.name == 'feed_isOutIn') { + // return res; + // } + // }); + + + // this.dataContent.itemCodeList.forEach(res => { + // if (res.handleQty > res.recommendQty) { + // this.$refs.modal.showConfirmMessageModal('实际数量大于需求数量,是否提交?', confirm => { + // if (confirm) { + // //提交 + // uni.showToast({ + // title: "提交" + // }) + // } + // }) + // } else { + // uni.showToast({ + // title: "扫描的数量" + res.handleQty + "]小于推荐数量[" + res.recommendQty + "]" + // }) + // } + // }) + // }, - submitJob() { + submit() { uni.showLoading({ title: "提交中....", mask: true @@ -248,13 +241,13 @@ //使用在途库,不查询管理模式 if (this.jobContent.useOnTheWayLocation == 'TRUE') { - this.submit(); + this.submitJob(); } else { //获取管理模式,封装参数 getManagementPrecisions(itemCodes, locationCode, res => { if (res.success) { this.managementList = res.list; - this.submit(); + this.submitJob(); } else { uni.hideLoading(); this.showErrorMessage(res.message); @@ -263,6 +256,23 @@ } }, + submitJob() { + var params = this.setParams() + console.log("提交参数", JSON.stringify(params)); + + issueJobSubmit(params).then(res => { + uni.hideLoading() + if (res.data) { + this.showCommitSuccessMessage("提交成功
生成发货记录" + res.data) + } else { + this.showErrorMessage("提交失败" + res.msg) + } + }).catch(error => { + uni.hideLoading() + this.showErrorMessage(error) + }) + }, + setParams() { var subList = [] var createTime = getCurrDateTime(); @@ -316,24 +326,6 @@ return this.jobContent; }, - submit() { - var params = this.setParams() - console.log("提交参数", JSON.stringify(params)); - - issueJobSubmit(params).then(res => { - uni.hideLoading() - if (res.data) { - this.showCommitSuccessMessage("提交成功
生成发货记录" + res.data) - } else { - this.showErrorMessage("提交失败" + res.msg) - } - }).catch(error => { - uni.hideLoading() - this.showErrorMessage(error) - }) - }, - - cancel() { let that = this; this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的零件和目标库位信息?', res => { @@ -415,6 +407,14 @@ this.$refs.comMessage.showCommitSuccess(); }, + showCommitSuccessMessage(hint) { + this.$refs.comMessage.showSuccessMessage(hint, res => { + uni.navigateTo({ + url: './issueJob' + }) + }) + }, + showRescanMessage(message) { this.$refs.comMessage.showRescanMessage(message); }, diff --git a/pages/issue/js/issue.js b/pages/issue/js/issue.js index dc78933c..93ccf03f 100644 --- a/pages/issue/js/issue.js +++ b/pages/issue/js/issue.js @@ -33,7 +33,6 @@ export function createDetailInfo(location, detail) { item.Locations.push(location); } else { //在库位下查找批次 - debugger; let batch = location.Batchs.find(r => r.batch == detail.batch); if (batch == undefined) { let batch = createBatchInfo(detail); diff --git a/pages/productDismantle/record/productDismantleRecord.vue b/pages/productDismantle/record/productDismantleRecord.vue index f6ba5a74..462309cb 100644 --- a/pages/productDismantle/record/productDismantleRecord.vue +++ b/pages/productDismantle/record/productDismantleRecord.vue @@ -137,7 +137,6 @@ mounted() {}, methods: { getScanResult(result) { - debugger let balance = result.balance; let label = result.label; let pack = result.package; diff --git a/static/config.json b/static/config.json index 0e975816..d6de88d6 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://dev.ccwin-in.com:25100/api/admin-api", + "value": "http://192.168.0.230:12080/admin-api", "dev2":"http://192.168.0.157:12080/admin-api", "dev":"http://dev.ccwin-in.com:25100/api/admin-api", "local":"http://localhost:12080",