lijuncheng 8 months ago
parent
commit
7934a8c3f0
  1. 3
      mycomponents/scan/winScanItem.vue
  2. 80
      pages/issue/coms/comIssueRequestPopup.vue
  3. 78
      pages/issue/record/issueRecord.vue
  4. 2
      static/config.json

3
mycomponents/scan/winScanItem.vue

@ -46,6 +46,7 @@
data() { data() {
return { return {
code: '', code: '',
result: {},
isShow: false, isShow: false,
expand: false, expand: false,
scanList: [], scanList: [],
@ -76,6 +77,7 @@
this.$refs.scan.clearScanValue(); this.$refs.scan.clearScanValue();
}, },
getScanResult(result) { getScanResult(result) {
this.result = result;
if (result.label.barType == "QRCode") { if (result.label.barType == "QRCode") {
this.code = result.label.itemCode; this.code = result.label.itemCode;
} else if (result.label.barType == "BarCode") { } else if (result.label.barType == "BarCode") {
@ -86,6 +88,7 @@
callBack() { callBack() {
this.$refs.scan.clear(); this.$refs.scan.clear();
this.$emit("getScanCode", this.code); this.$emit("getScanCode", this.code);
this.$emit("getScanResult", this.code, this.result);
}, },
change(e) { change(e) {
this.isShow = e.show this.isShow = e.show

80
pages/issue/coms/comIssueRequestPopup.vue

@ -45,6 +45,13 @@
<uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;' <uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;'
:focus="numberFocus" @blur='numberFocus = false'> :focus="numberFocus" @blur='numberFocus = false'>
</uni-number-box> </uni-number-box>
<view class="std_pack">
<text>
/{{stdQty}}
<!-- {{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.uom)}} -->
</text>
</view>
<uom :uom="uom"></uom> <uom :uom="uom"></uom>
</view> </view>
</view> </view>
@ -58,7 +65,7 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<win-scan-item ref="scanPopup" title='物料代码' @getScanCode='getScanCode'> <win-scan-item ref="scanPopup" title='物料代码' @getScanResult='getItemScanResult'>
</win-scan-item> </win-scan-item>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -115,70 +122,7 @@
show: false, show: false,
isModifiedPosition: true, isModifiedPosition: true,
positionList: [], positionList: [],
list: [{ stdQty: 0, //
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'
}
]
},
]
}
]
} }
}, },
props: { props: {
@ -347,15 +291,15 @@
} }
}, },
getScanCode(code) { getItemScanResult(code, scanResult) {
if (code == "") { if (code == "") {
this.showErrorMessage('物料号不能为空') this.showErrorMessage('物料号不能为空')
return; return;
} }
this.itemCode = ""; this.itemCode = "";
this.checkItemCode(code) this.checkItemCode(code)
}, this.stdQty = scanResult.package.stdPackQty;
}
} }
} }
</script> </script>

78
pages/issue/record/issueRecord.vue

@ -8,10 +8,12 @@
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view v-for="(toLocation, index) in detailSource"> <view v-for="(toLocation, index) in detailSource">
<view class="uni-row uni-flex"> <view class="uni-row uni-flex">
<!-- <com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation"> <!-- <com-issue-request-info :workShopCode="workShopCode" :dataContent="toLocation">
</com-issue-request-info> --> </com-issue-request-info> -->
<work-station :workshopCode="workShopCode" :productionLineCode="toLocation.productionLineCode" <work-station :workshopCode="workShopCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"></work-station> :productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode"
:rawLocationCode="toLocation.toLocationCode"></work-station>
</view> </view>
<com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation" <com-issue-detail-card ref='comIssueDetailCard' :dataContent="toLocation"
@updateData='updateData'> @updateData='updateData'>
@ -61,7 +63,7 @@
import { import {
calc calc
} from '@/common/calc.js'; } from '@/common/calc.js';
import { import {
getManagementPrecisions getManagementPrecisions
} from '@/common/balance.js'; } from '@/common/balance.js';
@ -76,7 +78,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import workStation from '@/mycomponents/workStation/workStation.vue' import workStation from '@/mycomponents/workStation/workStation.vue'
export default { export default {
name: '', name: '',
components: { components: {
@ -101,8 +103,8 @@
fromInventoryStatuses: "", fromInventoryStatuses: "",
toInventoryStatuses: "", toInventoryStatuses: "",
requestList: [], requestList: [],
dataContent:{}, dataContent: {},
managementList:[] managementList: []
} }
}, },
mounted() { mounted() {
@ -212,7 +214,7 @@
caclcQty() { caclcQty() {
var totalQty = 0; var totalQty = 0;
this.detailSource.subList.forEach(res => { this.detailSource.subList.forEach(res => {
totalQty = calc.add(totalQty,res.qty); totalQty = calc.add(totalQty, res.qty);
}) })
this.detailSource.totalQty = totalQty; this.detailSource.totalQty = totalQty;
}, },
@ -244,10 +246,10 @@
let handleQty = 0; let handleQty = 0;
if (batch != undefined) { if (batch != undefined) {
batch.Records.forEach(res => { batch.Records.forEach(res => {
handleQty = calc.add(handleQty,res.qty); handleQty = calc.add(handleQty, res.qty);
}) })
batch.handleQty = handleQty; batch.handleQty = handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty) itemHandleQty = calc.add(itemHandleQty, handleQty)
} }
}) })
} }
@ -270,31 +272,39 @@
batch.Records.forEach(r => { batch.Records.forEach(r => {
let record = {}; let record = {};
record.handleQty = r.qty; record.handleQty = r.qty;
record.fromPackingNumber = r record.fromPackingNumber = r
.packingNumber; .packingNumber;
record.fromBatch = r.batch; record.fromBatch = r.batch;
record.fromContainerNumber = r record.fromContainerNumber = r
.ContainerNumber; .ContainerNumber;
record.toContainerNumber = r record.toContainerNumber = r
.ContainerNumber; .ContainerNumber;
record.toInventoryStatus = r record.toInventoryStatus = r
.inventoryStatus; .inventoryStatus;
record.toLocationCode = subItem record.toLocationCode = subItem
.toLocationCode; .toLocationCode;
record.fromLocationCode = fromLocation.fromLocationCode record.fromLocationCode = fromLocation
.fromLocationCode
record.supplierCode = r.supplierCode; 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( var info = getPackingNumberAndBatch(
this.managementList, r this.managementList, r
.itemCode, .itemCode,
r.packingNumber, r r.packingNumber, r
.batch); .batch);
record.toPackingNumber = info record.toPackingNumber = info
.packingNumber; .packingNumber;
record.toBatch = info.batch; record.toBatch = info.batch;
subItem.recordList.push(record); subItem.recordList.push(record);
}) })
subList.push(subItem); subList.push(subItem);
@ -303,7 +313,7 @@
}) })
}) })
}) })
this.dataContent.subList = subList this.dataContent.subList = subList
this.dataContent.createTime = createTime; this.dataContent.createTime = createTime;
this.dataContent.creator = creator; this.dataContent.creator = creator;
@ -314,7 +324,7 @@
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
// //
var itemCodes = [] var itemCodes = []
let locationCode = this.detailSource[0].toLocationCode let locationCode = this.detailSource[0].toLocationCode
@ -323,7 +333,7 @@
itemCodes.push(item.itemCode) itemCodes.push(item.itemCode)
}) })
}) })
// //
getManagementPrecisions(itemCodes, locationCode, res => { getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) { if (res.success) {
@ -336,11 +346,11 @@
}); });
}, },
submitJob() { submitJob() {
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
@ -353,20 +363,20 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData(); this.clearData();
}) })
}, },
clearData(){ clearData() {
this.detailSource =[]; this.detailSource = [];
this.requestList=[]; this.requestList = [];
this.dataContent ={} this.dataContent = {}
this.managementList=[] this.managementList = []
}, },
showMessage(message) { showMessage(message) {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {

2
static/config.json

@ -18,7 +18,7 @@
"request_url": { "request_url": {
"name": "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", "dev2": "http://192.168.0.157:12080/admin-api",
"chefang": "http://192.168.0.176:12080/admin-api", "chefang": "http://192.168.0.176:12080/admin-api",
"chenxinming": "http://192.168.0.230:12080/admin-api", "chenxinming": "http://192.168.0.230:12080/admin-api",

Loading…
Cancel
Save