Browse Source

修改发料添加供应商代码

intex
lijuncheng 5 days ago
parent
commit
e0668bc2f0
  1. 29
      src/pages/issue/job/issueDetailBatch.vue
  2. 6
      src/pages/issue/record/directIssueByBatch.vue

29
src/pages/issue/job/issueDetailBatch.vue

@ -8,17 +8,16 @@
<work-station :workshopCode="jobContent.workShopCode" <work-station :workshopCode="jobContent.workShopCode"
:productionLineCode="jobContent.detailProductionLineCode" :productionLineCode="jobContent.detailProductionLineCode"
:workStationCode="jobContent.detailWorkStationCode" :workStationCode="jobContent.detailWorkStationCode"
:rawLocationCode="jobContent.detailToLocationCode" :rawLocationCode="jobContent.detailToLocationCode" :itemGroup="jobContent.itemGroup"
:itemGroup="jobContent.itemGroup" :isShowItemGroup='true'> :isShowItemGroup='true'>
</work-station> </work-station>
</view> </view>
</view> </view>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource"> <view v-for="(toLocation, index) in detailSource">
<comIssueDetailCardBatch ref='comIssueDetailCardBatch' :dataContent="toLocation" :settingParam="jobContent" <comIssueDetailCardBatch ref='comIssueDetailCardBatch' :dataContent="toLocation"
@updateData='updateData' :settingParam="jobContent" @updateData='updateData'>
>
</comIssueDetailCardBatch> </comIssueDetailCardBatch>
<view class="split_line"></view> <view class="split_line"></view>
</view> </view>
@ -41,8 +40,8 @@
@afterScan='afterScan' :locationCode='fromLocationCode'> @afterScan='afterScan' :locationCode='fromLocationCode'>
</com-scan-issue-pack> --> </com-scan-issue-pack> -->
<winScanPackAndLocation :balanceFromInventoryStatuses="true" ref="scanPopup" <winScanPackAndLocation :balanceFromInventoryStatuses="true" ref="scanPopup" @getResult='getScanResult'
@getResult='getScanResult' :noShowBalanceMessage="false" @confirm='confirmFromLocation'> :noShowBalanceMessage="false" @confirm='confirmFromLocation'>
</winScanPackAndLocation> </winScanPackAndLocation>
<balance-select ref="balanceSelect"></balance-select> <balance-select ref="balanceSelect"></balance-select>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -529,6 +528,7 @@
packUnit: result.package.packUnit, packUnit: result.package.packUnit,
uom: result.balance.uom, uom: result.balance.uom,
isRecommTaskItem: false, // isRecommTaskItem: false, //
supplierCode: result.label.supplierCode
} }
detail.subList.push(item) detail.subList.push(item)
// //
@ -605,7 +605,6 @@
return return
} }
console.log("提交参数", params);
issueJobSubmit(params).then(res => { issueJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
@ -626,7 +625,10 @@
let arr = [] let arr = []
toLocationCode.subList.forEach(record => { toLocationCode.subList.forEach(record => {
if (record.scaned) { if (record.scaned) {
let obj = {...toLocationCode,...record} let obj = {
...toLocationCode,
...record
}
obj.recordList = [] obj.recordList = []
delete obj.balance delete obj.balance
delete obj.subList delete obj.subList
@ -651,7 +653,8 @@
obj1.toPackingNumber = ""; obj1.toPackingNumber = "";
obj1.packingNumber = ""; obj1.packingNumber = "";
let single_price = record.balance.singlePrice == null ? 0 : record.balance.singlePrice; let single_price = record.balance.singlePrice == null ? 0 : record.balance
.singlePrice;
obj1.singlePrice = single_price; obj1.singlePrice = single_price;
obj1.amount = single_price * record.qty; obj1.amount = single_price * record.qty;
@ -796,7 +799,8 @@
detail.subList.forEach(item => { detail.subList.forEach(item => {
if (item.scaned) { if (item.scaned) {
if (parseFloat(item.handleQty) > parseFloat(item.balance.qty)) { if (parseFloat(item.handleQty) > parseFloat(item.balance.qty)) {
str2 += `物料号【${detail.itemCode}】批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}\n` str2 +=
`物料号【${detail.itemCode}】批次【${item.batch}】提交数量【${parseFloat(item.handleQty)}】不可以大于库存数量【${item.balance.qty}\n`
} }
} }
if (item.isRecommTaskItem) { // if (item.isRecommTaskItem) { //
@ -806,7 +810,8 @@
str3 = '推荐的箱码没扫,' str3 = '推荐的箱码没扫,'
} }
if (parseFloat(item.handleQty) != parseFloat(item.qty)) { if (parseFloat(item.handleQty) != parseFloat(item.qty)) {
str3 += `物料号【${detail.itemCode}】批次【${item.batch}】扫描数量【${parseFloat(item.handleQty)}】和任务数量【${item.qty}】不一致\n` str3 +=
`物料号【${detail.itemCode}】批次【${item.batch}】扫描数量【${parseFloat(item.handleQty)}】和任务数量【${item.qty}】不一致\n`
} }
} }

6
src/pages/issue/record/directIssueByBatch.vue

@ -245,6 +245,7 @@
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
newDetail.packingNumber = pack.number newDetail.packingNumber = pack.number
newDetail.handleQty =label.qty newDetail.handleQty =label.qty
newDetail.supplierCode =label.supplierCode
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -260,6 +261,7 @@
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
newDetail.packingNumber = pack.number newDetail.packingNumber = pack.number
newDetail.handleQty =label.qty newDetail.handleQty =label.qty
newDetail.supplierCode =label.supplierCode
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
detail.handleQty=calc.add(detail.handleQty,result.label.qty) detail.handleQty=calc.add(detail.handleQty,result.label.qty)
@ -455,7 +457,6 @@
var params = { var params = {
...this.setRecordParams() ...this.setRecordParams()
} }
console.log("提交参数", JSON.stringify(params));
const isHaveItem = params.subList.find(item => item.handleQty > item.balanceQty) const isHaveItem = params.subList.find(item => item.handleQty > item.balanceQty)
if (isHaveItem) { if (isHaveItem) {
this.showErrorMessage(`物料号${isHaveItem.itemCode}`) this.showErrorMessage(`物料号${isHaveItem.itemCode}`)
@ -520,7 +521,8 @@
fromPackUnit: detail.packUnit, fromPackUnit: detail.packUnit,
toPackUnit: detail.packUnit, toPackUnit: detail.packUnit,
fromPackQty: detail.packQty, fromPackQty: detail.packQty,
toPackQty: detail.packQty toPackQty: detail.packQty,
supplierCode:detail.supplierCode
}] }]
subList.push(submitItem) subList.push(submitItem)
} }

Loading…
Cancel
Save