Browse Source

修改记录提交数字精度

wms3.0_pda
lijuncheng 8 months ago
parent
commit
47b9e9617d
  1. 2
      common/record.js
  2. 1
      mycomponents/qty/balanceQtyEdit.vue
  3. 2
      pages/container/record/containerUnBindRecord.vue
  4. 3
      pages/deliver/coms/comDeliverRequestPopup.vue
  5. 5
      pages/deliver/record/deliverRecord.vue
  6. 2
      pages/inventoryMove/coms/comMoveRecord.vue
  7. 3
      pages/issue/coms/comIssueRequestPopup.vue
  8. 2
      pages/package/record/mergePackageRecord.vue
  9. 2
      pages/package/record/overPackageRecord.vue
  10. 2
      pages/productPutaway/record/productPutawayRecord.vue
  11. 15
      pages/productPutaway/request/putawayRequestCreate.vue
  12. 19
      pages/productReceipt/record/productReceiptRecord.vue
  13. 1
      pages/productionReceipt/record/productionReceiptRecord.vue
  14. 13
      pages/productionReturn/coms/comReturnRecord.vue
  15. 67
      pages/productionReturn/record/returnToHold.vue
  16. 21
      pages/productionReturn/record/returnToStore.vue
  17. 5
      pages/purchaseReturn/record/returnRecord.vue
  18. 8
      pages/purchaseReturn/request/returnRequestCreate.vue
  19. 2
      pages/putaway/record/putawayRecord.vue
  20. 2
      pages/repleinsh/record/repleinshRecord.vue
  21. 18
      pages/scrap/record/scrapRecord.vue
  22. 4
      pages/scrap/request/scrapRequestCreate.vue
  23. 2
      pages/transfer/record/deliverRecord.vue
  24. 2
      pages/transfer/record/receiptRecord.vue
  25. 11
      pages/unPlanned/coms/comReceiptRecord.vue
  26. 34
      pages/unPlanned/coms/comReceiptRequestPopup.vue
  27. 2
      pages/unPlanned/record/issueRecord.vue
  28. 20
      pages/unPlanned/record/receiptRecord.vue
  29. 15
      pages/unPlanned/request/issueRequestCreate.vue
  30. 16
      pages/unPlanned/request/receiptRequestCreate.vue

2
common/record.js

@ -34,7 +34,7 @@ export function createDetailInfo(balance, pack) {
detail.qty = new Decimal(detail.qty).toNumber();
detail.stdPackQty = new Decimal(pack.stdPackQty).toNumber()
detail.stdPackUnit = pack.stdPackUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack;
return detail;

1
mycomponents/qty/balanceQtyEdit.vue

@ -141,6 +141,7 @@
openEditPopup(item, handleQty) {
this.dataContent = item
this.inventoryStatus = this.dataContent.inventoryStatus
this.originalInventoryStatus =this.dataContent.inventoryStatus;
this.toInventoryStatus = this.dataContent.toInventoryStatus
this.allQty = handleQty
setTimeout(res => {

2
pages/container/record/containerUnBindRecord.vue

@ -301,7 +301,7 @@
detail.itemCode = detail.itemCode;
detail.batch = detail.batch;
detail.inventoryStatus = detail.inventoryStatus;
detail.qty =detail.handleQty;
detail.package = null;
subList.push(detail)
}

3
pages/deliver/coms/comDeliverRequestPopup.vue

@ -42,7 +42,7 @@
<text>数量 : </text>
<view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;">
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
<input style="text-align: center;" class="qty_input" v-model="qty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
<uom :uom="uom"></uom>
@ -162,6 +162,7 @@
this.itemCode = "";
this.uom = ""
this.qty = 0
this.counQty =0;
this.itemCodeGetFocus();
}

5
pages/deliver/record/deliverRecord.vue

@ -172,9 +172,8 @@
}
})
if (item == undefined) {
var itemp = createItemInfo(balance.qty, pack);
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
if(labelQty)
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
@ -380,7 +379,7 @@
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package ="";
subList.push(submitItem)

2
pages/inventoryMove/coms/comMoveRecord.vue

@ -421,7 +421,7 @@
submitItem.package = null;
submitItem.Records = null;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
subList.push(submitItem)
}

3
pages/issue/coms/comIssueRequestPopup.vue

@ -163,7 +163,8 @@
} else {
this.itemCode = "";
this.uom = ""
this.qty = 0
this.qty = 0;
this.count = 0;
this.itemCodeGetFocus();
}

2
pages/package/record/mergePackageRecord.vue

@ -271,7 +271,7 @@
detail.fromInventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = detail.inventoryStatus;
detail.fromQty = detail.qty
detail.fromQty = detail.handleQty
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = this.toPackingNumber;

2
pages/package/record/overPackageRecord.vue

@ -262,7 +262,7 @@
subItem.itemDesc2 = detail.package.itemDesc2;
subItem.fromInventoryStatus = detail.inventoryStatus;
subItem.fromQty = detail.qty
subItem.fromQty = detail.handleQty
subItem.fromPackingNumber = detail.packingNumber;
subItem.fromBatch = detail.batch;
subItem.fromLocationCode = detail.locationCode;

2
pages/productPutaway/record/productPutawayRecord.vue

@ -335,7 +335,7 @@
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package ="";
subList.push(submitItem)
}

15
pages/productPutaway/request/putawayRequestCreate.vue

@ -53,6 +53,7 @@
import {
goHome,
updateTitle,
deepCopyData,
getCurrDateTime,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
@ -210,14 +211,7 @@
},
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty,detail.qty)
}
}
}
calcHandleQty(this.detailSource)
this.$forceUpdate();
},
@ -283,7 +277,7 @@
productPutawayRequestSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品上架申请<br>" + res.data, )
this.showCommitSuccessMessage("提交成功<br>生成制品上架申请<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -305,8 +299,7 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var subItem = {};
Object.assign(subItem, detail)
var subItem = deepCopyData(detail)
subItem.fromLocationCode = detail.locationCode;
subItem.qty = detail.handleQty;
subItem.package = null;

19
pages/productReceipt/record/productReceiptRecord.vue

@ -65,6 +65,8 @@
calc
} from '@/common/calc.js';
import { Decimal } from 'decimal.js';//
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -186,8 +188,8 @@
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(label.qty),
handleQty: 0,
qty: new Decimal(label.qty).toNumber(),
handleQty: new Decimal(0).toNumber(),
uom: pack.uom,
subList: []
}
@ -195,11 +197,10 @@
},
createDetailInfo(label, pack) {
let detail = {};
Object.assign(detail, label)
let detail = deepCopyData(label);
detail.scaned = true;
detail.qty = Number(label.qty);
detail.handleQty = 0;
detail.qty = new Decimal(label.qty).toNumber();
detail.handleQty = new Decimal(label.qty).toNumber();
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -211,10 +212,10 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty,detail.qty)
item.handleQty = calc.add(item.handleQty,detail.handleQty)
}
}
}
@ -331,7 +332,7 @@
submitItem.productionlineCode = this.productionLineCode;
submitItem.workStationCode = this.workStationCode;
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package = "";
subList.push(submitItem)

1
pages/productionReceipt/record/productionReceiptRecord.vue

@ -316,6 +316,7 @@
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.fromLocationCode = '';
this.toLocationCode =""
})
},

13
pages/productionReturn/coms/comReturnRecord.vue

@ -5,8 +5,7 @@
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowBalance="true"></item-qty>
<item-qty :dataContent="dataContent" :showItemQty="false" :isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
@ -17,7 +16,7 @@
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true"
:isShowFromLocation="true" :isShowToLocation="isShowToLocation"></balance>
:isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation"></balance>
<!-- <production-label :dataContent="item" :packageContent="item.package"
:isShowLocation="false">
</production-label> -->
@ -86,6 +85,10 @@
isShowToLocation: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
}
},
watch: {
@ -147,7 +150,7 @@
edit(item) {
this.editItem = item;
this.$refs.recommendQtyEdit.openRecordEditPopup(item.qty);
this.$refs.recommendQtyEdit.openRecordEditPopup(item.handleQty);
// this.$refs.recommendQtyEdit.openEditPopup(item.qty);
},
@ -165,7 +168,7 @@
});
},
confirm(qty) {
this.editItem.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}

67
pages/productionReturn/record/returnToHold.vue

@ -67,6 +67,10 @@
calc
} from '@/common/calc.js';
import {
Decimal
} from 'decimal.js'; //
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -168,7 +172,7 @@
this.$refs.scanPopup.openScanPopup(isEditPosition);
},
async getScanResult(result, param) {
async getScanResult(result, param) {
this.positionInfo = param.positionInfo;
this.workshopCode = param.workshopCode;
this.productionLineCode = param.productionLineCode;
@ -186,26 +190,26 @@
if (item == undefined) {
var filters = []
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "locationCode",
action: "==",
value: this.rawLocationCode
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
var isCheckItemCode = await getBalanceByFilter(params);
if(isCheckItemCode.data==null||isCheckItemCode.data.list==0){
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "locationCode",
action: "==",
value: this.rawLocationCode
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
var isCheckItemCode = await getBalanceByFilter(params);
if (isCheckItemCode.data == null || isCheckItemCode.data.list == 0) {
this.showErrorMessage("未查询到物料号[" + label.itemCode + "]" +
"库位[" + this.rawLocationCode + "]的信息")
"库位[" + this.rawLocationCode + "]的信息")
return
}
@ -247,8 +251,8 @@
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(label.qty),
handleQty: 0,
qty: new Decimal(label.qty).toNumber(),
handleQty: new Decimal(0).toNumber(),
uom: pack.uom,
subList: []
}
@ -256,11 +260,10 @@
},
createDetailInfo(label, pack) {
let detail = {};
Object.assign(detail, label)
let detail = deepCopyData(label);
detail.scaned = true;
detail.qty = Number(label.qty);
detail.handleQty = 0;
detail.qty = new Decimal(label.qty).toNumber();
detail.handleQty = new Decimal(label.qty).toNumber();
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -273,10 +276,10 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty,detail.qty)
item.handleQty = calc.add(item.handleQty, detail.handleQty)
}
}
}
@ -421,9 +424,11 @@
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var fromInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail.itemCode,
var fromInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail
.itemCode,
detail.packingNumber, detail.fromLocationCode, detail.batch);
var toInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail.itemCode,
var toInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail
.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
submitItem.itemCode = detail.itemCode;
@ -448,7 +453,7 @@
submitItem.productionlineCode = this.productionLineCode;
submitItem.workStationCode = this.workStationCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
subList.push(submitItem)
}

21
pages/productionReturn/record/returnToStore.vue

@ -15,6 +15,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReturnRecord :dataContent="item" :index="index" @removeItem="removeItem(index,item)"
:isShowFromLocation="false"
@updateData="updateData" @removePack="removePack">
</comReturnRecord>
</view>
@ -62,6 +63,8 @@
calc
} from '@/common/calc.js';
import { Decimal } from 'decimal.js';//
import {
getBusinessType,
} from '@/common/record.js';
@ -215,6 +218,7 @@
newDetail.toWarehouseCode = toLocation.warehouseCode;
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.calcHandleQty();
})
} else {
@ -232,6 +236,7 @@
newDetail.fromLocationCode = this.rawLocationCode;
newDetail.toWarehouseCode = toLocation.warehouseCode;
item.subList.push(newDetail);
this.calcHandleQty();
});
} else {
@ -240,7 +245,6 @@
}
}
}
this.calcHandleQty();
},
createItemInfo(label, pack) {
let item = {
@ -248,8 +252,8 @@
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(label.qty),
handleQty: 0,
qty: new Decimal(label.qty).toNumber(),
handleQty: new Decimal(0).toNumber(),
uom: pack.uom,
subList: []
}
@ -257,11 +261,10 @@
},
createDetailInfo(label, pack) {
let detail = {};
Object.assign(detail, label)
let detail = deepCopyData(label);
detail.scaned = true;
detail.qty = Number(label.qty);
detail.handleQty =0;
detail.qty = new Decimal(label.qty).toNumber();
detail.handleQty = new Decimal(label.qty).toNumber();
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -274,10 +277,10 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty,detail.qty)
item.handleQty = calc.add(item.handleQty,detail.handleQty)
}
}
}

5
pages/purchaseReturn/record/returnRecord.vue

@ -241,7 +241,6 @@
});
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
console.log("提交参数", JSON.stringify(params));
//
//
@ -254,7 +253,7 @@
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购退货记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败" + res.msg)
this.showErrorMessage("提交失败[" + res.msg+"]")
}
}).catch(error => {
uni.hideLoading()
@ -290,7 +289,7 @@
submitItem.fromLocationCode = this.fromLocationCode;
submitItem.toLocationCode = ''; //退
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package = "";
subList.push(submitItem)
}

8
pages/purchaseReturn/request/returnRequestCreate.vue

@ -45,6 +45,7 @@
goHome,
updateTitle,
navigateBack,
deepCopyData,
getCurrDateOneMonthsTimes
} from '@/common/basic.js';
@ -209,7 +210,6 @@
commit() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
console.log("提交参数", JSON.stringify(params));
uni.showLoading({
title: "提交中....",
mask: true
@ -240,11 +240,13 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
if(supplierCode==""){
supplierCode = detail.package.supplierCode
}
detail.fromLocationCode = detail.locationCode
subList.push(detail)
submitItem.fromLocationCode = detail.locationCode
submitItem.qty =detail.handleQty;
subList.push(submitItem)
}
})
})

2
pages/putaway/record/putawayRecord.vue

@ -386,7 +386,7 @@
// detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = detail.toLocationCode
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.qty = detail.handleQty ;
submitItem.package = "";
subList.push(submitItem)
}

2
pages/repleinsh/record/repleinshRecord.vue

@ -72,8 +72,6 @@
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';

18
pages/scrap/record/scrapRecord.vue

@ -18,7 +18,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
:isShowFromLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
:isShowToLocation="false"
@removePack="removePack">
</record-com-detail-card>
@ -176,20 +176,6 @@
},
createItemInfo(balance, pack) {
let item = {
itemCode: balance.itemCode,
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: Number(balance.qty),
handleQty: 0,
uom: pack.uom,
subList: []
}
return item;
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -297,7 +283,7 @@
submitItem.toLocationCode = "";
submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package ="";
subList.push(submitItem)
}

4
pages/scrap/request/scrapRequestCreate.vue

@ -17,7 +17,9 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
:isShowFromLocation="true"
:isShowToLocation="false"
@removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</record-com-detail-card>
</view>

2
pages/transfer/record/deliverRecord.vue

@ -334,7 +334,7 @@
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package = "";
subList.push(submitItem)

2
pages/transfer/record/receiptRecord.vue

@ -316,7 +316,7 @@
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package = "";
subList.push(submitItem)

11
pages/unPlanned/coms/comReceiptRecord.vue

@ -5,7 +5,7 @@
<template v-slot:title>
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="removeData($event,dataContent)" :right-options="removeOptions">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
<item-qty :dataContent="dataContent" :showItemQty="false"
:isShowBalance="true"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
@ -16,9 +16,8 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item,index)"
:right-options="item.scaned?scanOptions:detailOptions">
<purchase-label :dataContent="item.label" :packageContent="item.package"
:isShowLocation="false">
</purchase-label>
<balance :dataContent="item" :isShowStdPack="false" :isShowStatus="true" :isShowPack="true"
:isShowFromLocation="false" :isShowToLocation="false"></balance>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <u-line color="#D8D8D8"></u-line> -->
@ -147,7 +146,7 @@
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openRecordEditPopup(item.label.qty);
this.$refs.qtyEdit.openRecordEditPopup(item.handleQty);
},
detail(packageInfo) {
@ -164,7 +163,7 @@
});
},
confirm(qty) {
this.editItem.label.qty = qty;
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}

34
pages/unPlanned/coms/comReceiptRequestPopup.vue

@ -48,10 +48,13 @@
<text>数量 : </text>
<view class="uni-flex uni-row uni-center"
style="align-items: center;margin-left: 20rpx;">
<uni-number-box :value="counQty" @change="change" style='margin-left: 10rpx;'
:focus="numberFocus" @blur='numberFocus = false'>
</uni-number-box>
<input style="text-align: center;" class="qty_input" v-model="counQty" type="number"
@confirm="confirm()" :focus="numberFocus" @input="checkNum" :maxlength="maxlength" />
<uom :uom="uom"></uom>
<view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>)
</view>
</view>
</view>
@ -65,7 +68,7 @@
</view>
</view>
</uni-popup>
<win-scan-item ref="itemPopup" title='物料代码' @getScanCode='getItemCode'>
<win-scan-item ref="itemPopup" title='物料代码' @getScanResult='getItemCode'>
</win-scan-item>
<winScanLocation ref="locationPopup" title="库位代码" @getLocation='getLocationCode'></winScanLocation>
<comMessage ref="comMessage"></comMessage>
@ -82,6 +85,7 @@
checkDirectoryItemExist
} from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue'
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue'
@ -90,6 +94,7 @@
export default {
components: {
uom,
stdPackQty,
balanceStatus,
comMessage,
winScanItem,
@ -112,6 +117,8 @@
toLocationCode: '请扫描库位信息',
isCheckLocationCode: false,
editPosition: true,
maxlength:10,
stdPackInfo:undefined
}
},
props: {
@ -121,12 +128,28 @@
},
},
methods: {
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
let reg = /^[0-9]+$/; //
if (dot > -1) {
this.maxlength = dot + 7; //
if (value.length > dot + 7) {
}
}
if (reg.test(value)) { //
this.maxlength = 10;
}
this.change(value)
},
openRequestPopup(editPosition) {
this.editPosition = editPosition;
if (!editPosition) {
this.itemCode = "";
this.uom = ""
this.qty = 0
this.count = 0;
this.itemCodeGetFocus();
}
this.$refs.popup.open('bottom')
@ -231,13 +254,14 @@
this.closeRequestPopup();
},
getItemCode(code) {
getItemCode(code, scanResult) {
if (code == "") {
this.showErrorMessage('物料号不能为空')
return;
}
this.itemCode = "";
this.checkItemCode(code)
this.stdPackInfo = scanResult.package;
},
getLocationCode(location, code) {
this.toLocationCode = code;

2
pages/unPlanned/record/issueRecord.vue

@ -255,7 +255,7 @@
submitItem.toLocationCode = "";
submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.qty = detail.handleQty;
submitItem.package ="";
subList.push(submitItem)

20
pages/unPlanned/record/receiptRecord.vue

@ -68,6 +68,8 @@
import {
calc
} from '@/common/calc.js';
import { Decimal } from 'decimal.js';//
import {
goHome,
updateTitle,
@ -173,8 +175,8 @@
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
qty: label.qty,
handleQty: 0,
qty: new Decimal(label.qty).toNumber(),
handleQty: new Decimal(0).toNumber(),
uom: label.uom,
subList: []
}
@ -182,12 +184,12 @@
},
createDetailInfo(label, pack) {
let detail = {};
let detail = deepCopyData(label);
detail.scaned = true;
// Object.assign(detail, label)
detail.qty = Number(label.qty)
detail.handleQty = 0,
detail.inventoryStatus = "OK"
detail.qty = new Decimal(label.qty).toNumber();
detail.handleQty = new Decimal(label.qty).toNumber();
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
label.inventoryStatus = "OK";
@ -199,10 +201,10 @@
calcHandleQty() {
for (let item of this.detailSource) {
item.qty = 0;
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
item.qty = calc.add(item.qty, detail.label.qty)
item.handleQty = calc.add(item.handleQty, detail.handleQty)
}
}
}
@ -339,7 +341,7 @@
submitItem.reason = this.reasonCode;
submitItem.qty = detail.label.qty;
submitItem.qty = detail.handleQty;
submitItem.package = "";
subList.push(submitItem)

15
pages/unPlanned/request/issueRequestCreate.vue

@ -18,7 +18,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" :isShowLocation="true"
@removeItem="removeItem(index,item)" @updateData="updateData" :isShowFromLocation="true" :isShowToLocation="false"
@removePack="removePack">
</record-com-detail-card>
</view>
@ -78,6 +78,7 @@
import {
goHome,
updateTitle,
deepCopyData,
getCurrDateTimes,
getCurrDateOneMonthsTimes,
navigateBack
@ -255,16 +256,18 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.fromLocationCode = detail.locationCode;
detail.reason = this.reasonCode;
detail.containerNumber ="";
subList.push(detail)
var submitItem = deepCopyData(detail)
submitItem.fromLocationCode = detail.locationCode;
submitItem.reason = this.reasonCode;
submitItem.containerNumber ="";
submitItem.qty = detail.handleQty;
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList
this.dataContent.status = 1;
this.dataContent.status = "1";
this.dataContent.requestTime = getCurrDateTimes();
this.dataContent.dueTime = getCurrDateOneMonthsTimes();

16
pages/unPlanned/request/receiptRequestCreate.vue

@ -58,6 +58,7 @@
getISODateTime,
navigateBack,
getBatch,
deepCopyData,
getCurrDateTimes,
getCurrDateOneMonthsTimes
} from '@/common/basic.js';
@ -186,16 +187,17 @@
setRequestParams() {
var subList = []
this.detailSource.subList.forEach(detail => {
detail.toLocationCode = this.detailSource.toLocationCode;
detail.reason = this.reasonCode;
detail.containerNumber = "";
detail.batch = getBatch();
detail.inventoryStatus = "OK";
var submitItem = deepCopyData(detail)
submitItem.toLocationCode = this.detailSource.toLocationCode;
submitItem.reason = this.reasonCode;
submitItem.containerNumber = "";
submitItem.batch = getBatch();
submitItem.inventoryStatus = "OK";
console.log("", getBatch())
subList.push(detail)
subList.push(submitItem)
})
this.dataContent.subList = subList
this.dataContent.status = 1;
this.dataContent.status = "1";
this.dataContent.requestTime = getCurrDateTimes();
this.dataContent.dueTime = getCurrDateOneMonthsTimes();

Loading…
Cancel
Save