diff --git a/mycomponents/scan/winScanItem.vue b/mycomponents/scan/winScanItem.vue index b95f52f9..11f26ce8 100644 --- a/mycomponents/scan/winScanItem.vue +++ b/mycomponents/scan/winScanItem.vue @@ -46,6 +46,7 @@ data() { return { code: '', + result: {}, isShow: false, expand: false, scanList: [], @@ -76,6 +77,7 @@ this.$refs.scan.clearScanValue(); }, getScanResult(result) { + this.result = result; if (result.label.barType == "QRCode") { this.code = result.label.itemCode; } else if (result.label.barType == "BarCode") { @@ -86,6 +88,7 @@ callBack() { this.$refs.scan.clear(); this.$emit("getScanCode", this.code); + this.$emit("getScanResult", this.code, this.result); }, change(e) { this.isShow = e.show diff --git a/pages/issue/coms/comIssueRequestPopup.vue b/pages/issue/coms/comIssueRequestPopup.vue index 0824a730..5abca9a7 100644 --- a/pages/issue/coms/comIssueRequestPopup.vue +++ b/pages/issue/coms/comIssueRequestPopup.vue @@ -45,6 +45,13 @@ + + + + /{{stdQty}} + + + @@ -58,7 +65,7 @@ - + @@ -115,70 +122,7 @@ show: false, isModifiedPosition: true, positionList: [], - list: [{ - value: 1, - label: '车间1', - children: [{ - value: 2, - label: '生产线1', - children: [{ - value: 3, - label: '工位1' - }, - { - value: 4, - label: '工位2' - } - ] - }, - { - value: 5, - label: '生产线2', - children: [{ - value: 6, - label: '工位1' - }, - { - value: 7, - label: '工位2' - } - ] - } - ] - }, - { - value: 8, - label: '车间2', - children: [{ - value: 9, - label: '生产线1', - children: [{ - value: 10, - label: '工位1' - }, - { - value: 10, - label: '工位2' - } - ] - }, { - value: 9, - label: '生产线2', - children: [{ - value: 10, - label: '工位1' - }, - { - value: 10, - label: '工位2' - } - ] - }, - - - ] - } - ] + stdQty: 0, //标包 } }, props: { @@ -347,15 +291,15 @@ } }, - getScanCode(code) { + getItemScanResult(code, scanResult) { if (code == "") { this.showErrorMessage('物料号不能为空') return; } this.itemCode = ""; this.checkItemCode(code) - }, - + this.stdQty = scanResult.package.stdPackQty; + } } } diff --git a/pages/issue/record/issueRecord.vue b/pages/issue/record/issueRecord.vue index 1b95de9d..fec2efc8 100644 --- a/pages/issue/record/issueRecord.vue +++ b/pages/issue/record/issueRecord.vue @@ -8,10 +8,12 @@ - - + @@ -61,7 +63,7 @@ import { calc } from '@/common/calc.js'; - + import { getManagementPrecisions } from '@/common/balance.js'; @@ -76,7 +78,7 @@ import winScanButton from '@/mycomponents/scan/winScanButton.vue' import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' import workStation from '@/mycomponents/workStation/workStation.vue' - + export default { name: '', components: { @@ -101,8 +103,8 @@ fromInventoryStatuses: "", toInventoryStatuses: "", requestList: [], - dataContent:{}, - managementList:[] + dataContent: {}, + managementList: [] } }, mounted() { @@ -212,7 +214,7 @@ caclcQty() { var totalQty = 0; this.detailSource.subList.forEach(res => { - totalQty = calc.add(totalQty,res.qty); + totalQty = calc.add(totalQty, res.qty); }) this.detailSource.totalQty = totalQty; }, @@ -244,10 +246,10 @@ let handleQty = 0; if (batch != undefined) { batch.Records.forEach(res => { - handleQty = calc.add(handleQty,res.qty); + handleQty = calc.add(handleQty, res.qty); }) batch.handleQty = handleQty; - itemHandleQty = calc.add(itemHandleQty,handleQty) + itemHandleQty = calc.add(itemHandleQty, handleQty) } }) } @@ -270,31 +272,39 @@ batch.Records.forEach(r => { let record = {}; record.handleQty = r.qty; - + record.fromPackingNumber = r .packingNumber; record.fromBatch = r.batch; record.fromContainerNumber = r .ContainerNumber; - + record.toContainerNumber = r .ContainerNumber; record.toInventoryStatus = r .inventoryStatus; record.toLocationCode = subItem .toLocationCode; - record.fromLocationCode = fromLocation.fromLocationCode + record.fromLocationCode = fromLocation + .fromLocationCode record.supplierCode = r.supplierCode; - + + let single_price = r.singlePrice == null ? + 0 : r.singlePrice; + + record.singlePrice = single_price; + record.amount = single_price * r.qty; + + //使用在途库不改变管理模式 - var info = getPackingNumberAndBatch( - this.managementList, r - .itemCode, - r.packingNumber, r - .batch); - record.toPackingNumber = info - .packingNumber; - record.toBatch = info.batch; + var info = getPackingNumberAndBatch( + this.managementList, r + .itemCode, + r.packingNumber, r + .batch); + record.toPackingNumber = info + .packingNumber; + record.toBatch = info.batch; subItem.recordList.push(record); }) subList.push(subItem); @@ -303,7 +313,7 @@ }) }) }) - + this.dataContent.subList = subList this.dataContent.createTime = createTime; this.dataContent.creator = creator; @@ -314,7 +324,7 @@ title: "提交中....", mask: true }); - + //目前任务只到一个库位 var itemCodes = [] let locationCode = this.detailSource[0].toLocationCode @@ -323,7 +333,7 @@ itemCodes.push(item.itemCode) }) }) - + //获取管理模式,封装参数 getManagementPrecisions(itemCodes, locationCode, res => { if (res.success) { @@ -336,11 +346,11 @@ }); }, - + submitJob() { var params = this.setParams() console.log("提交参数", JSON.stringify(params)); - + issueRecordSubmit(params).then(res => { uni.hideLoading() if (res.data) { @@ -353,20 +363,20 @@ this.showErrorMessage(error) }) }, - + showCommitSuccessMessage(hint) { this.$refs.comMessage.showSuccessMessage(hint, res => { this.clearData(); }) }, - clearData(){ - this.detailSource =[]; - this.requestList=[]; - this.dataContent ={} - this.managementList=[] + clearData() { + this.detailSource = []; + this.requestList = []; + this.dataContent = {} + this.managementList = [] }, - + showMessage(message) { this.$refs.comMessage.showMessage(message, res => { if (res) { diff --git a/static/config.json b/static/config.json index 7b990381..61fe3fd0 100644 --- a/static/config.json +++ b/static/config.json @@ -18,7 +18,7 @@ "request_url": { "name": "request_url", - "value": "http://192.168.0.179:12080/admin-api", + "value": "http://192.168.0.106:12080/admin-api", "dev2": "http://192.168.0.157:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",