Browse Source

Merge branch 'master' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp

# Conflicts:
#	pages/issue/job/issueDetail.vue
wms3.0_pda
niexiting 10 months ago
parent
commit
2d5ee0ecba
  1. 2
      common/detail.js
  2. 2
      common/record.js
  3. 6
      mycomponents/balance/handleBalance.vue
  4. 10
      mycomponents/balance/recommendBalance.vue
  5. 14
      mycomponents/detail/comDetailCard.vue
  6. 4
      mycomponents/item/itemCompareQty.vue
  7. 6
      mycomponents/package/packageDetailPopup.vue
  8. 13
      mycomponents/qty/compareQty.vue
  9. 8
      mycomponents/recommend/recommend.vue
  10. 8
      pages.json
  11. 7
      pages/container/record/containerBindRecord.vue
  12. 7
      pages/container/record/containerUnBindRecord.vue
  13. 20
      pages/count/job/countDetail.vue
  14. 20
      pages/count/record/countRecord.vue
  15. 45
      pages/customerReturn/record/returnRecord.vue
  16. 74
      pages/deliver/coms/comScanDeliverPack.vue
  17. 24
      pages/deliver/job/deliverDetail.vue
  18. 39
      pages/deliver/record/deliverRecord.vue
  19. 8
      pages/deliver/request/deliverRequestCreate.vue
  20. 5
      pages/index/index.vue
  21. 20
      pages/inspect/job/inspectDetail.vue
  22. 18
      pages/inspect/job/inspectFullDetail.vue
  23. 104
      pages/inventoryMove/coms/comMoveRecord.vue
  24. 14
      pages/inventoryMove/coms/comMoveRecordCard.vue
  25. 12
      pages/inventoryMove/coms/comMovebalance.vue
  26. 2
      pages/inventoryMove/record/oktoScrapRecord.vue
  27. 2
      pages/issue/coms/comIssueDetailCard.vue
  28. 35
      pages/issue/coms/comIssueRequestCreator.vue
  29. 22
      pages/issue/coms/comScanIssuePack.vue
  30. 5
      pages/issue/js/issue.js
  31. 9
      pages/issue/record/issueRecord.vue
  32. 13
      pages/issue/request/issueRequestCreate.vue
  33. 12
      pages/package/record/splitPackageRecord.vue
  34. 39
      pages/productPutaway/record/productPutawayRecord.vue
  35. 6
      pages/productPutaway/request/putawayRequestCreate.vue
  36. 14
      pages/productReceipt/coms/comProductDetailCard.vue
  37. 48
      pages/productReceipt/record/productReceiptRecord.vue
  38. 1
      pages/productionReceipt/record/productionReceiptRecord.vue
  39. 10
      pages/productionReturn/coms/comReturn.vue
  40. 18
      pages/productionReturn/coms/comReturnDetailCard.vue
  41. 35
      pages/productionReturn/coms/comReturnRequestCreator.vue
  42. 59
      pages/productionReturn/coms/comScanReturnPack.vue
  43. 47
      pages/productionReturn/record/returnToHold.vue
  44. 43
      pages/productionReturn/record/returnToStore.vue
  45. 32
      pages/productionReturn/request/returnRequestCreate.vue
  46. 31
      pages/purchaseReturn/record/returnRecord.vue
  47. 4
      pages/purchaseReturn/request/returnRequestCreate.vue
  48. 40
      pages/putaway/record/putawayRecord.vue
  49. 16
      pages/putaway/request/putawayRequestCreate.vue
  50. 6
      pages/query/container.vue
  51. 6
      pages/query/location.vue
  52. 6
      pages/query/location_copy.vue
  53. 19
      pages/repleinsh/coms/comScanReplishPack.vue
  54. 95
      pages/repleinsh/job/repleinshDetail.vue
  55. 33
      pages/repleinsh/record/repleinshRecord.vue
  56. 41
      pages/scrap/record/scrapRecord.vue
  57. 38
      pages/transfer/coms/comTransferRecord.vue
  58. 12
      pages/transfer/job/transferDetail.vue
  59. 445
      pages/transfer/record/deliverRecord.vue
  60. 423
      pages/transfer/record/receiptRecord.vue
  61. 39
      pages/unPlanned/record/issueRecord.vue
  62. 38
      pages/unPlanned/record/receiptRecord.vue
  63. 41
      pages/unPlanned/request/receiptRequestCreate.vue

2
common/detail.js

@ -59,7 +59,7 @@ export function calcHandleQty(detailSource) {
item.handleQty = 0;
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
item.handleQty += Number(detail.handleQty)
item.handleQty = calc.add(item.handleQty,detail.handleQty)
}
}
}

2
common/record.js

@ -28,8 +28,10 @@ export function createDetailInfo(data, pack) {
let detail = {};
Object.assign(detail, data)
detail.balanceQty = Number(detail.qty)
detail.qty = Number(detail.qty);
detail.stdPackQty = Number(pack.stdPackQty)
detail.stdPackUnit = pack.stdPackUnit
detail.handleQty =0;
detail.package = pack;
return detail;

6
mycomponents/balance/handleBalance.vue

@ -1,12 +1,12 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="space_between">
<view >
<view class="space_between" >
<view style="word-break: break-all;width: 60%;">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view >
<view style="word-break: break-all;">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail"
:isShowStdPack="false"></recommend-qty>

10
mycomponents/balance/recommendBalance.vue

@ -1,17 +1,17 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view :class="detail.scaned?'scan_view':''" style="background-color: #fff;">
<view class="uni-flex uni-row space-between center ">
<view class="uni-flex uni-row center ">
<view style=" width: 20px;color: #32C1E8;">
<view class="uni-flex uni-row " style="width: 60%;margin-left: 30rpx;" >
<view style=" width: 25rpx;color: #32C1E8;">
推荐
</view>
<view >
<view style="word-break: break-all">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
<view >
<view style="word-break: break-all">
<recommend-qty v-if="detail.Records==null || detail.Records.length==0" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="false"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number( detail.qty)"

14
mycomponents/detail/comDetailCard.vue

@ -73,7 +73,19 @@
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {

4
mycomponents/item/itemCompareQty.vue

@ -1,9 +1,9 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="background-color:#fff;">
<view>
<view style="word-break: break-all;width: 50%;">
<item :dataContent="dataContent"></item>
</view>
<view>
<view style="word-break: break-all;width: 50%;display: flex;justify-content:flex-end;margin-right: 10rpx;">
<recommend-qty v-if="handleQty==0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack ="isShowStdPack"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="Number(handleQty)" :isShowStatus="false"

6
mycomponents/package/packageDetailPopup.vue

@ -61,13 +61,13 @@
this.dataList.length = 0;
this.dataList.push(...[{
item_title: '包装号',
text_wrap: this.dataContent.number
content: this.dataContent.number
}, {
item_title: '物料代码',
text_wrap: this.dataContent.itemCode
content: this.dataContent.itemCode
}, {
item_title: '物品名称',
text_wrap: this.dataContent.itemName
content: this.dataContent.itemName
}, {
item_title: '物品描述1',
content: this.dataContent.itemDesc1

13
mycomponents/qty/compareQty.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-row ">
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<view class="uni-flex uni-row center">
<view v-if ="Number(handleQty)>0">
<view v-if ="Number(handleQty)!=0">
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
</view>
@ -15,13 +15,13 @@
</view>
</view>
<view v-if="Number(handleQty)>0 " class="std_split">/</view>
<view v-if="Number(handleQty)!=0" class="std_split">/</view>
<view v-if="isShowRecommendQty" class="text_recommend center">
{{Number(recommendQty)}}
</view>
</view>
<uom v-show="Number(handleQty)>0||(isShowRecommendQty&&Number(recommendQty)>0)" :uom="dataContent.uom"></uom>
<uom v-show="Number(handleQty)!=0||(isShowRecommendQty&&Number(recommendQty)>0)" :uom="dataContent.uom"></uom>
</view>
<view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty>
@ -80,7 +80,12 @@
}
},
watch: {
handleQty: {
handler(newName, oldName) {
},
immediate: true,
deep: true
}
},
methods: {

8
mycomponents/recommend/recommend.vue

@ -2,7 +2,7 @@
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;">
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view>
<view style="word-break: break-all;width: 50%;">
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
@ -11,15 +11,17 @@
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</to-location>
</view>
<view>
<view style="word-break: break-all;">
<!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false">
</compare-qty>
<view class="uni-flex uni-row" style="vertical-align:center" v-if="isDevlement()">
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; " @click="copy">复制采购</text>
<text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text>
</view>

8
pages.json

@ -299,7 +299,7 @@
{
"path": "pages/putaway/record/putawayRecord",
"style": {
"navigationBarTitleText": "原料上架",
"navigationBarTitleText": "原料上架记录",
"enablePullDownRefresh": false
}
},
@ -466,7 +466,7 @@
{
"path": "pages/issue/record/issueRecord",
"style": {
"navigationBarTitleText": "直接发料",
"navigationBarTitleText": "直接发料记录",
"enablePullDownRefresh": true,
"titleNView": {
"autoBackButton": "true"
@ -561,14 +561,14 @@
{
"path": "pages/productionReturn/record/returnToStore",
"style": {
"navigationBarTitleText": "合格退料",
"navigationBarTitleText": "合格退料记录",
"enablePullDownRefresh": false
}
},
{
"path": "pages/productionReturn/record/returnToHold",
"style": {
"navigationBarTitleText": "隔离退料",
"navigationBarTitleText": "隔离退料记录",
"enablePullDownRefresh": false
}
},

7
pages/container/record/containerBindRecord.vue

@ -57,6 +57,10 @@
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
createItemInfo,
@ -226,7 +230,7 @@
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
@ -260,6 +264,7 @@
data.scaned = false;
data.packingNumber = data.contentNumber
data.qty = Number(data.qty)
data.handleQty = 0;
let detail = data;
return detail;
},

7
pages/container/record/containerUnBindRecord.vue

@ -52,6 +52,10 @@
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -171,7 +175,7 @@
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
@ -205,6 +209,7 @@
data.scaned = false;
data.packingNumber = data.contentNumber
data.qty = Number(data.qty)
data.handleQty =0;
let detail = data;
return detail;
},

20
pages/count/job/countDetail.vue

@ -63,6 +63,9 @@
cancleTakeCountJob,
countJobSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
@ -72,7 +75,7 @@
import {
getCountStageName
} from '@/common/directory.js';
import { calc } from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -203,8 +206,8 @@
item.subList.push(newDetail);
items.push(item)
} else {
console.log("数量",item.qty)
item.qty = calc.add(item.qty,detail.qty)
console.log("数量", item.qty)
item.qty = calc.add(item.qty, detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
@ -230,6 +233,7 @@
data.scaned = false;
let detail = data;
detail.balanceQty = 0
detail.handleQty = 0;
detail.inventoryStatus = detail.inventoryStatus
detail.fromLocationCode = this.fromLocationCode
return detail;
@ -252,7 +256,7 @@
item.handleQty = 0;
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
item.handleQty = calc.add(item.handleQty,detail.qty)
item.handleQty = calc.add(item.handleQty, detail.qty)
}
}
}
@ -290,13 +294,13 @@
this.$refs.scanPopup.openScanPopupForJob(fromlocationCode, fromlocationList, this.jobContent);
},
closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.packGetFocus();
}
},
@ -380,7 +384,7 @@
"]不在列表中,是否添加到列表?",
res => {
if (res) {
detail.qty += Number(detail.qty)
detail.qty = calc.add(detail.qty,detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
detail.subList.push(newDetail);
this.updateData()
@ -429,7 +433,7 @@
fromLocationCode: balance.locationCode,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
creator:this.$store.state.user.id
creator: this.$store.state.user.id
}
return detail;

20
pages/count/record/countRecord.vue

@ -51,6 +51,10 @@
navigateBack
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -136,8 +140,7 @@
uni.stopPullDownRefresh();
},
mounted() {
},
mounted() {},
methods: {
calcScanCount(closeScan) {
let items = this.subList.filter(r => {
@ -156,7 +159,8 @@
item.handleQty = 0;
for (let detail of item.subList) {
if (item.scaned) {
item.handleQty += Number(detail.qty)
item.handleQty = calc.add(item.handleQty,detail.qty)
}
}
}
@ -218,13 +222,13 @@
},
closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
if(this.$refs.scanPopup!=undefined){
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.packGetFocus();
}
},
@ -263,9 +267,7 @@
if (res) {
this.$refs.CountQtyEdit.openEditPopup(this.itemEditInfo,
detail.subList);
}
else
{
} else {
this.scanPopupGetFocus();
}
})
@ -303,7 +305,7 @@
return record;
},
addExistItemCodeToList(detail, result) {
detail.qty += detail.qty
detail.qty = calc.add(detail.qty,detail.qty)
let newDetail = this.createAddDetailInfo(result.balance, result.package); //
detail.subList.push(newDetail);
},

45
pages/customerReturn/record/returnRecord.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='getLocation' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
@ -56,7 +56,8 @@
import {
goHome,
updateTitle,
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
@ -323,27 +324,32 @@
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
var submitItem = deepCopyData(detail)
detail.inventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = detail.inventoryStatus;
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
submitItem.inventoryStatus = detail.inventoryStatus;
submitItem.toInventoryStatus = detail.inventoryStatus;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(submitItem)
subList.push(detail)
}
})
})
@ -388,6 +394,11 @@
},
getToLocationCode(location, code) {
this.toLocationCode = code;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
showCommitSuccessMessage(hint) {

74
pages/deliver/coms/comScanDeliverPack.vue

@ -45,8 +45,8 @@
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true" :headerType="headerType"
:isShowHistory="false">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
:headerType="headerType" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
@ -102,6 +102,11 @@
getDetailOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
calc
} from '@/common/calc.js';
import {
getWorkShopLineStation
} from '@/api/request2.js';
@ -150,9 +155,9 @@
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
label:{},
fromInventoryStatuses :"",
packageInfo:{}
label: {},
fromInventoryStatuses: "",
packageInfo: {}
}
},
created() {
@ -185,14 +190,14 @@
let that = this;
that.fromLocationList = [];
if (that.dataContent != null) {
that.fromInventoryStatuses =this.jobContent.outInventoryStatuses
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
that.fromLocationList = that.getFromLocationList();
}
},
showBalanceSelect(items,packageInfo) {
showBalanceSelect(items, packageInfo) {
this.packageInfo = packageInfo;
this.$refs.balanceSelect.openPopup(items);
},
@ -250,25 +255,26 @@
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance,packageInfo);
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.label = result.label;
this.showBalanceSelect(balanceRes.data.list, packageInfo);
}
} else {
this.label =result.label;
this.showBalanceSelect(balanceRes.data.list,packageInfo);
this.showErrorMessage(balanceRes.message.message);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
uni.hideLoading();
});
}
} catch (e) {
this.showErrorMessage(e.stack)
@ -277,11 +283,11 @@
},
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance,this.packageInfo);
this.afterGetBalance(this.label, balance, this.packageInfo);
},
afterGetBalance(label, balance,packageInfo) {
afterGetBalance(label, balance, packageInfo) {
try {
let that = this;
let itemCode = label.itemCode;
@ -302,11 +308,11 @@
if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance,packageInfo)
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance,packageInfo);
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
@ -316,7 +322,7 @@
}
}
} else {
that.addRecord(batch, label, balance,packageInfo)
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
@ -371,14 +377,14 @@
return batch;
},
creatRecord(label, balance,packageInfo) {
creatRecord(label, balance, packageInfo) {
balance.stdPackQty = packageInfo.stdPackQty
balance.stdPackUnit = packageInfo.stdPackUnit
let record = {
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(label.qty)>Number(balance.qty)?Number(balance.qty):Number(label.qty),
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
@ -391,13 +397,13 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance,packageInfo) {
let record = this.creatRecord(label, balance,packageInfo);
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);

24
pages/deliver/job/deliverDetail.vue

@ -2,9 +2,9 @@
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent" ></job-top>
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item" >
<view class="header_item">
申请单号{{jobContent.requestNumber}}
</view>
<u-line color="#D8D8D8"></u-line>
@ -55,6 +55,10 @@
deliverJobSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -99,9 +103,9 @@
detailSource: [], //
detailOptions: [],
scanOptions: [],
status:"",
received :false,
toLocationCode:""
status: "",
received: false,
toLocationCode: ""
};
},
@ -168,7 +172,7 @@
that.jobContent = res.data;
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
that.toLocationCode =that.subList[0].toLocationCode
that.toLocationCode = that.subList[0].toLocationCode
that.resizeCollapse();
} else {
that.showMessage('列表数据为0');
@ -204,7 +208,7 @@
var itemCodes = []
let locationCode = this.detailSource[0].toLocationCode
this.detailSource.forEach(toLocationCode => {
toLocationCode.Items.forEach(item=>{
toLocationCode.Items.forEach(item => {
itemCodes.push(item.itemCode)
})
})
@ -235,7 +239,7 @@
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发货记录" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg+"]")
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
@ -338,10 +342,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty)
}
})
}

39
pages/deliver/record/deliverRecord.vue

@ -60,7 +60,8 @@
} from '@/api/request2.js';
import {
goHome,
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
@ -121,7 +122,7 @@
},
onLoad(option) {
var typeCode = "DeliverRecord"
var typeCode = "Deliver"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
@ -359,32 +360,36 @@
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
subList.push(detail)
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.customerCode =this.customerCode;
this.dataContent.customerCode = this.customerCode;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent;

8
pages/deliver/request/deliverRequestCreate.vue

@ -29,6 +29,10 @@
issueRecordSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -123,7 +127,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
@ -136,7 +140,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},

5
pages/index/index.vue

@ -193,6 +193,8 @@
})
this.$forceUpdate()
}).catch(res=>{
console.log("获取消息失败",res)
});
},
@ -326,7 +328,8 @@
if (res.data.length > 0) {
uni.setStorageSync("dictionary", res.data)
}
}).catch(res=>{
console.log("获取字典失败",res)
})
},

20
pages/inspect/job/inspectDetail.vue

@ -466,17 +466,19 @@
detail.toInventoryStatus = "NOK"
}
}
} else {
detail.sampleQty = detail.qty;
detail.failedQty = 0;
detail.crackQty = 0;
detail.notPassedQty = 0;
detail.goodQty = detail.qty;
detail.inspectUser = this.$store.state.user.id
detail.toInventoryStatus = "OK"
}
// else {
// detail.sampleQty = detail.qty;
// detail.failedQty = 0;
// detail.crackQty = 0;
// detail.notPassedQty = 0;
// detail.handleQty = 0;
// detail.goodQty = detail.qty;
// detail.inspectUser = this.$store.state.user.id
// detail.toInventoryStatus = "OK"
// }
list.push(detail)
})
})

18
pages/inspect/job/inspectFullDetail.vue

@ -59,6 +59,10 @@
getManagementPrecisions
} from '@/common/balance.js';
import {
calc
} from '@/common/calc.js';
import {
getDataSource,
createRecordInfo,
@ -254,8 +258,8 @@
for (let item of this.detailSource) {
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
failedQty += Number(detail.failedQty)
crackQty += Number(detail.crackQty)
failedQty= calc.add(failedQty,detail.failedQty)
crackQty= calc.add(crackQty,detail.crackQty)
}
}
}
@ -325,8 +329,9 @@
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if(this.jobContent.allowModifyInventoryStatus=="TRUE"){
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续检验?', res => {
if (res) {
itemDetail.scaned = true;
@ -337,8 +342,9 @@
this.scanPopupGetFocus();
}
});
}else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + itemStatus +
} else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});

104
pages/inventoryMove/coms/comMoveRecord.vue

@ -23,7 +23,7 @@
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation'
:locationTypeList="toLocationTypeArray" :isShowEdit="allowEditStatus"></requiredLocation>
:locationTypeList="tolocationTypeList" :isShowEdit="isShowEditLocation"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -63,7 +63,8 @@
} from '@/common/balance.js';
import {
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
@ -124,6 +125,7 @@
dataContent: {},
fromlocationTypeList: [],
tolocationTypeList: [],
isShowEditLocation:false
}
},
@ -139,29 +141,11 @@
}
});
this.initData();
this.getLocationInfo();
},
onLoad() {
if (this.toLocationCode != '') {
getBasicLocationByCode(this.toLocationCode).then(res => {
if (res.data.total > 0) {
let result = res.data.list[0];
var type = result.type;
var available = result.available;
if (available == "TRUE") {
this.toLocationInfo = res.data.list[0];
} else {
this.showErrorMessage("扫描库位[" + this.code + "]不可用")
}
} else {
this.showErrorMessage('库位[' + this.toLocationCode + ']不存在')
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
}
},
methods: {
@ -170,10 +154,12 @@
this.title = "库存转移记录";
this.toInventoryStatus = ""
this.toLocationCode = ""
this.isShowEditLocation =true;
} else if (this.businessTypeCode == "HoldToOk") {
this.title = "隔离转合格记录";
this.toInventoryStatus = "OK"
this.toLocationCode = "OK"
this.toLocationCode = ""
this.isShowEditLocation =true;
} else if (this.businessTypeCode == "HoldToScrap") {
this.title = "隔离转报废记录";
this.toInventoryStatus = "SCRAP"
@ -182,10 +168,10 @@
this.title = "合格转隔离记录";
this.toInventoryStatus = "HOLD"
this.toLocationCode = "HOLD"
} else if (this.businessTypeCode == "OktoScrap") {
} else if (this.businessTypeCode == "OkToScrap") {
this.title = "合格转报废记录";
this.toInventoryStatus = "SCRAP"
this.toLocationCode = "HOLD"
this.toLocationCode = "SCRAP"
} else if (this.businessTypeCode == "ScrapToHold") {
this.title = "报废转隔离记录";
this.toInventoryStatus = "HOLD"
@ -195,6 +181,29 @@
title: this.title
})
},
getLocationInfo(){
if (this.toLocationCode != "") {
getBasicLocationByCode(this.toLocationCode).then(res => {
if (res.data.total > 0) {
let result = res.data.list[0];
var type = result.type;
var available = result.available;
if (available == "TRUE") {
this.toLocationInfo = res.data.list[0];
} else {
this.showErrorMessage("扫描库位[" + this.code + "]不可用")
}
} else {
this.showErrorMessage('库位[' + this.toLocationCode + ']不存在')
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error)
})
}
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
@ -230,14 +239,15 @@
// newDetail.inventoryStatus = balance.inventoryStatus;
newDetail.toInventoryStatus = this.toInventoryStatus;
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus &&
r.fromLocationCode == balance.locationCode &&
r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
}
@ -248,6 +258,7 @@
// newDetail.inventoryStatus = balance.inventoryStatus;
newDetail.toInventoryStatus = this.toInventoryStatus;
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
this.showErrorMessage(balance.packingNumber + "已经在列表中")
@ -326,7 +337,7 @@
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "记录<br>" +
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "<br>" +
res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
@ -386,32 +397,33 @@
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
var subItem = {};
Object.assign(subItem, detail)
subItem.itemCode = detail.itemCode;
subItem.itemName = detail.package.itemName;
subItem.itemDesc1 = detail.package.itemDesc1;
subItem.itemDesc2 = detail.package.itemDesc2;
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.fromInventoryStatus = detail.inventoryStatus;
submitItem.toInventoryStatus = detail.toInventoryStatus;
subItem.fromInventoryStatus = detail.inventoryStatus;
subItem.toInventoryStatus = detail.toInventoryStatus;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
subItem.fromPackingNumber = info.packingNumber;
subItem.toPackingNumber = info.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
subItem.fromContainerNumber = detail.containerNumber;
subItem.toContainerNumber = detail.containerNumber
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
subItem.fromBatch = info.batch;
subItem.toBatch = info.batch;
submitItem.fromLocationCode = detail.fromLocationCode;
submitItem.toLocationCode = detail.toLocationCode;
subItem.fromLocationCode = detail.locationCode;
subItem.toLocationCode = detail.toLocationCode;
submitItem.package = null;
submitItem.Records = null;
subItem.package = null;
subItem.Records = null;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
subList.push(subItem)
subList.push(submitItem)
}
})
})

14
pages/inventoryMove/coms/comMoveRecordCard.vue

@ -86,7 +86,19 @@
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {

12
pages/inventoryMove/coms/comMovebalance.vue

@ -6,14 +6,14 @@
<pack v-if="isShowPack && dataContent.packingNumber!=''" :packingCode="dataContent.packingNumber">
</pack>
<batch v-if="isShowBatch" :batch="dataContent.batch"></batch>
<location v-if="isShowLocation" :locationCode="dataContent.locationCode"></location>
<location v-if="isShowLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"></location>
</view>
<view>
<qty :isShowStatus="false"
v-if="dataContent.record==null ||dataContent.record==undefined " :dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.record.qty" :isShowStdPack="isShowStdPack">
<!-- <qty :isShowStatus="false"
:dataContent="dataContent"
:isShowStdPack="isShowStdPack"></qty> -->
<compare-qty :dataContent="dataContent" :recommendQty="dataContent.qty"
:handleQty="dataContent.handleQty" :isShowStdPack="isShowStdPack">
</compare-qty>
<move-status :fromInventoryStatus="fromInventoryStatus" :toInventoryStatus="toInventoryStatus" :showToInventoryStatus="allowEditStatus">
</move-status>

2
pages/inventoryMove/record/oktoScrapRecord.vue

@ -1,6 +1,6 @@
<template>
<view class="page-wraper">
<comMoveRecord businessTypeCode='OktoScrap' > </comMoveRecord>
<comMoveRecord businessTypeCode='OkToScrap' > </comMoveRecord>
</view>
</template>

2
pages/issue/coms/comIssueDetailCard.vue

@ -21,7 +21,7 @@
</location>
</view>
<view v-for="(batch,index) in loacation.Batchs">
<recommend-balance style='margin-left: 20px;' :detail="batch" :isShowLocation="false"
<recommend-balance style='margin-left: 0rpx;' :detail="batch" :isShowLocation="false"
:isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
</recommend-balance>
<view class="uni-flex uni-row " v-if='batch.Records.length>0'>

35
pages/issue/coms/comIssueRequestCreator.vue

@ -8,7 +8,7 @@
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions">
<uni-swipe-action-item @click="swipeClick($event,item,index)" :right-options="options">
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
<u-line />
@ -76,13 +76,6 @@
},
},
watch: {
dataContent: {
handler(newval, oldval) {
this.requestItem = this.dataContent.subList[0];
},
immediate: true,
deep: true
}
},
data() {
@ -94,9 +87,9 @@
}
},
requestItem: {},
detailOptions: [],
scanOptions: []
scanOptions: [],
options:[]
}
},
@ -105,26 +98,27 @@
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
this.scanOptions = getDetailRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
if(!this.isSwipe){
this.detailOptions=[]
}
this.options =this.scanOptions
// if(!this.isSwipe){
// this.detailOptions=[]
// }
},
methods: {
swipeClick(e, item) {
swipeClick(e, item,index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
this.remove(item,index)
}
},
edit(item) {
@ -138,17 +132,12 @@
// // this.showItem = item;
// // this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
remove(item,index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.dataContent.subList.splice(index, 1)
this.$forceUpdate()
this.$emit('remove', item)
}
});
},

22
pages/issue/coms/comScanIssuePack.vue

@ -46,7 +46,7 @@
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
:isShowHistory="false">
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
@ -106,6 +106,10 @@
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -321,11 +325,15 @@
)
}
} else {
if (this.jobContent.AllowModifyBatch == null) {
if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发料明细,是否要继续发料?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance,packageInfo);
let batch = that.createBatchInfo(label, balance, packageInfo);
//details
if (fromLocation.Batchs.length > 0) {
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
}
})
@ -352,7 +360,7 @@
}
},
createBatchInfo(data, balance,packageInfo) {
createBatchInfo(data, balance, packageInfo) {
let batch = {
batch: data.batch,
qty: 0,
@ -360,7 +368,7 @@
handleQty: Number(data.qty),
Records: []
}
let record = this.creatRecord(data, balance,packageInfo);
let record = this.creatRecord(data, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
return batch;
@ -370,7 +378,7 @@
balance.stdPackQty = packageInfo.stdPackQty
balance.stdPackUnit = packageInfo.stdPackUnit
let record = {
scaned:true,
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
@ -387,7 +395,7 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;

5
pages/issue/js/issue.js

@ -1,3 +1,6 @@
import {
calc
} from '@/common/calc.js';
export function getDataSource(list, subList) {
for (var i = 0; i < subList.length; i++) {
let detail = subList[i];
@ -25,7 +28,7 @@ export function createDetailInfo(location, detail) {
item = createItemInfo(detail);
location.Items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
//在零件下查找库位
let location = item.Locations.find(r => r.fromLocationCode == detail.fromLocationCode);
if (location == undefined) {

9
pages/issue/record/issueRecord.vue

@ -58,6 +58,9 @@
import {
getBusinessType,
} from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import {
getManagementPrecisions
@ -209,7 +212,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty);
})
this.detailSource.totalQty = totalQty;
},
@ -241,10 +244,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty);
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty)
}
})
}

13
pages/issue/request/issueRequestCreate.vue

@ -5,7 +5,7 @@
</view>
<view v-else class="page-wraper">
<view class="page-main">
<comIssueRequestCreator ref="issueRequest" :dataContent="detailSource" :isSwipe ="false">
<comIssueRequestCreator ref="issueRequest" :dataContent="detailSource" :isSwipe="false">
</comIssueRequestCreator>
<button class="btn_add" @click="goScan(false)">+去添加</button>
</view>
@ -31,6 +31,10 @@
issueRequestSubmit,
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -95,7 +99,7 @@
productionLineName: item.productionLineName,
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
toLocationCode:item.rawLocationCode,
toLocationCode: item.rawLocationCode,
totalQty: 0,
subList: []
}
@ -131,8 +135,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
this.caclcQty();
@ -142,7 +145,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},

12
pages/package/record/splitPackageRecord.vue

@ -48,6 +48,10 @@
splitPackageRecordSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -180,9 +184,9 @@
var sumQty = 0;
item.subList[0].Records.forEach(function(item1, index) {
sumQty += item1.qty;
sumQty = calc.add(sumQty,item1.qty)
});
if ((Number(qty) + sumQty) > item.subList[0].qty) {
if (calc.add(qty,sumQty)> item.subList[0].qty) {
this.showErrorMessage("扫描数量总和【" + (Number(qty) + sumQty) + "】(当前输入数量【" + qty + "】+已添加数量【" +
sumQty +
"】)已超过拆包箱码的数量【" + Number(item.subList[0].qty) + "】!");
@ -200,7 +204,7 @@
if (detail.Records.length > 0) {
detail.Records.forEach(r => {
hQty += Number(r.qty)
hQty = calc.add(hQty,r.qty)
})
}
detail.handleQty = hQty;
@ -306,7 +310,7 @@
subItem.toBatch = record.batch;
subItem.fromLocationCode = subItem.fromLocationCode;
subItem.package = ""
subItem.Records=""
subItem.Records = ""
subList.push(subItem)
}

39
pages/productPutaway/record/productPutawayRecord.vue

@ -46,7 +46,8 @@
} from '@/api/request2.js';
import {
goHome,
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
getPrecisionStrategyList
@ -312,28 +313,31 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
subList.push(detail)
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(submitItem)
}
})
})
@ -377,6 +381,11 @@
},
getToLocationCode(location, code) {
this.toLocationCode = code;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = this.toLocationCode
})
})
},
showCommitSuccessMessage(hint) {

6
pages/productPutaway/request/putawayRequestCreate.vue

@ -61,6 +61,10 @@
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
createItemInfo,
@ -210,7 +214,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}

14
pages/productReceipt/coms/comProductDetailCard.vue

@ -69,7 +69,19 @@
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {

48
pages/productReceipt/record/productReceiptRecord.vue

@ -57,9 +57,14 @@
} from '@/common/balance.js';
import {
goHome,
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -194,6 +199,7 @@
Object.assign(detail, label)
detail.scaned = true;
detail.qty = Number(label.qty);
detail.handleQty = 0;
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -208,7 +214,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -300,31 +306,35 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.productionlineCode = this.productionLineCode;
submitItem.workStationCode = this.workStationCode;
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.package = "";
subList.push(detail)
subList.push(submitItem)
}
})
})
@ -386,7 +396,7 @@
this.clearData();
})
},
clearData(){
clearData() {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';

1
pages/productionReceipt/record/productionReceiptRecord.vue

@ -47,6 +47,7 @@
} from '@/api/request2.js';
import {
goHome,
deepCopyData
} from '@/common/basic.js';
import {

10
pages/productionReturn/coms/comReturn.vue

@ -57,6 +57,10 @@
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -226,7 +230,7 @@
detail.inventoryStatus = this.businessTypeCode == 'ReturnToStore' ? "OK" : "HOLD"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
detail.handleQty = 0;
detail.package = pack;
detail.label = label;
return detail;
@ -237,7 +241,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty, detail.qty)
}
}
}
@ -431,7 +435,7 @@
this.clearData();
})
},
clearData(){
clearData() {
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';

18
pages/productionReturn/coms/comReturnDetailCard.vue

@ -62,14 +62,26 @@
default: {}
},
locationTypeList: {
type: Object,
default: {}
type: Array,
default: []
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {

35
pages/productionReturn/coms/comReturnRequestCreator.vue

@ -5,7 +5,7 @@
</comReturnRequestInfo>
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in dataContent.subList" :key="index">
<uni-swipe-action-item @click="swipeClick($event,item)" :right-options="detailOptions">
<uni-swipe-action-item @click="swipeClick($event,item,index)" :right-options="options">
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
<!-- <view v-if="item.batch!=''" style="margin-left: 10rpx;">
@ -36,7 +36,7 @@
import {
getDetailOption,
getDetailEditRemoveOption,
getDetailRemoveOption
getDetailRemoveOption,
} from '@/common/array.js';
export default {
@ -79,7 +79,6 @@
},
watch: {
dataContent(newVal) {
this.requestItem = newVal.subList[0];
},
},
@ -92,9 +91,9 @@
}
},
requestItem: {},
detailOptions: [],
scanOptions: []
scanOptions: [],
options:[]
}
},
@ -103,26 +102,30 @@
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getDetailEditRemoveOption();
this.scanOptions = getDetailRemoveOption();
// if (this.dataContent.allowModifyQty == 1) {
// this.scanOptions = getDetailEditRemoveOption();
// } else {
// this.scanOptions = getDetailRemoveOption();
// }
}
if(!this.isSwipe){
this.detailOptions=[]
}
this.options =this.scanOptions
// if(!this.isSwipe){
// this.options=[]
// }else {
// this.options =this.scanOptions
// }
},
methods: {
swipeClick(e, item) {
swipeClick(e, item,index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
this.remove(item,index)
}
},
edit(item) {
@ -136,17 +139,13 @@
// // this.showItem = item;
// // this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
remove(item,index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.record = {}
item.balance = {}
item.inventoryStatus = item.RecommendInventoryStatus
// item.record.qty = 0;
this.dataContent.subList.splice(index, 1)
this.$forceUpdate()
this.$emit('remove', item)
// this.$emit('remove', item)
}
});
},

59
pages/productionReturn/coms/comScanReturnPack.vue

@ -7,7 +7,7 @@
扫描箱码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
@ -106,6 +106,10 @@
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -145,7 +149,7 @@
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
fromInventoryStatuses :"",
fromInventoryStatuses: "",
}
},
created() {
@ -243,24 +247,25 @@
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses, balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance,packageInfo);
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.showBalanceSelect(balanceRes.data.list);
}
} else {
this.showBalanceSelect(balanceRes.data.list);
this.showErrorMessage(balanceRes.message.message);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
uni.hideLoading();
});
}
} catch (e) {
this.showErrorMessage(e.stack)
@ -271,7 +276,7 @@
this.afterGetBalance(this.label, balance);
},
afterGetBalance(label, balance,packageInfo) {
afterGetBalance(label, balance, packageInfo) {
try {
let that = this;
let itemCode = label.itemCode;
@ -292,11 +297,11 @@
if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance,packageInfo)
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance,packageInfo);
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
@ -306,7 +311,7 @@
}
}
} else {
that.addRecord(batch, label, balance,packageInfo)
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
@ -361,14 +366,14 @@
return batch;
},
creatRecord(label, balance,packageInfo) {
creatRecord(label, balance, packageInfo) {
balance.stdPackQty = packageInfo.stdPackQty
balance.stdPackUnit = packageInfo.stdPackUnit
let record = {
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(label.qty)>Number(balance.qty)?Number(balance.qty):Number(label.qty),
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
@ -381,13 +386,13 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance,packageInfo) {
let record = this.creatRecord(label, balance,packageInfo);
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);

47
pages/productionReturn/record/returnToHold.vue

@ -58,9 +58,14 @@
import {
goHome,
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
@ -229,6 +234,7 @@
Object.assign(detail, label)
detail.scaned = true;
detail.qty = Number(label.qty);
detail.handleQty = 0;
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -244,7 +250,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -388,34 +394,37 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var fromInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail.itemCode,
detail.packingNumber, detail.fromLocationCode, detail.batch);
var toInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.fromPackingNumber = fromInfo.packingNumber;
submitItem.toPackingNumber = toInfo.packingNumber;
detail.fromPackingNumber = fromInfo.packingNumber;
detail.toPackingNumber = toInfo.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromBatch = fromInfo.batch;
submitItem.toBatch = toInfo.batch;
detail.fromBatch = fromInfo.batch;
detail.toBatch = toInfo.batch;
submitItem.fromLocationCode = detail.fromLocationCode;
submitItem.toLocationCode = detail.toLocationCode;
detail.fromLocationCode = detail.fromLocationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.productionlineCode = this.productionLineCode;
submitItem.workStationCode = this.workStationCode;
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
subList.push(detail)
subList.push(submitItem)
}
})
})
@ -428,8 +437,6 @@
showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {

43
pages/productionReturn/record/returnToStore.vue

@ -50,12 +50,17 @@
import {
goHome,
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
@ -230,6 +235,7 @@
Object.assign(detail, label)
detail.scaned = true;
detail.qty = Number(label.qty);
detail.handleQty =0;
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -245,7 +251,8 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -417,34 +424,36 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var fromInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail.itemCode,
detail.packingNumber, detail.fromLocationCode, detail.batch);
var toInfo = getPackingNumberAndBatchByList(this.fromManagementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = fromInfo.packingNumber;
detail.toPackingNumber = toInfo.packingNumber;
submitItem.fromPackingNumber = fromInfo.packingNumber;
submitItem.toPackingNumber = toInfo.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = fromInfo.batch;
detail.toBatch = toInfo.batch;
submitItem.fromBatch = fromInfo.batch;
submitItem.toBatch = toInfo.batch;
detail.fromLocationCode = detail.fromLocationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.fromLocationCode = detail.fromLocationCode;
submitItem.toLocationCode = detail.toLocationCode;
detail.productionlineCode = this.productionLineCode;
detail.workStationCode = this.workStationCode;
submitItem.productionlineCode = this.productionLineCode;
submitItem.workStationCode = this.workStationCode;
subList.push(detail)
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
subList.push(submitItem)
}
})
})

32
pages/productionReturn/request/returnRequestCreate.vue

@ -5,7 +5,7 @@
</view>
<view v-else class="page-wraper">
<view class="page-main">
<comReturnRequestCreator ref="issueRequest" :dataContent="detailSource" :isSwipe ="false">
<comReturnRequestCreator ref="issueRequest" :dataContent="detailSource" :isSwipe="false">
</comReturnRequestCreator>
<button class="btn_add" @click="goScan(false)">+去添加</button>
</view>
@ -31,6 +31,10 @@
productionReturnRequestCreate,
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -100,7 +104,7 @@
productionLineName: item.productionLineName,
workStationCode: item.workStationCode,
workStationName: item.workStationName, //
fromLocationCode:item.rawLocationCode,
fromLocationCode: item.rawLocationCode,
status: "1",
totalQty: 0,
subList: []
@ -110,9 +114,9 @@
workStationCode: item.workStationCode,
itemCode: item.itemCode,
itemName: item.itemName,
inventoryStatus:"OK",
packingNumber:"",
fromLocationCode:item.rawLocationCode,
inventoryStatus: "OK",
packingNumber: "",
fromLocationCode: item.rawLocationCode,
qty: item.qty,
uom: item.uom
}
@ -131,9 +135,9 @@
workStationCode: item.workStationCode,
itemCode: item.itemCode,
itemName: item.itemName,
inventoryStatus:"OK",
packingNumber:"",
fromLocationCode:item.rawLocationCode,
inventoryStatus: "OK",
packingNumber: "",
fromLocationCode: item.rawLocationCode,
qty: item.qty,
uom: item.uom
}
@ -142,7 +146,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
@ -152,21 +156,21 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},
setParams() {
//退
if(this.fromType=="ReturnToStore"){
if (this.fromType == "ReturnToStore") {
this.detailSource.isOK = true
this.detailSource.dueTime = getCurrDateOneMonthsTimes()
this.detailSource.subList.forEach(res => {
res.batch ="000000"
res.batch = "000000"
})
//退
}else if(this.fromType=="ReturnToHold"){
//退
} else if (this.fromType == "ReturnToHold") {
this.detailSource.isOK = false
this.detailSource.dueTime = getCurrDateOneMonthsTimes()
this.detailSource.subList.forEach(res => {

31
pages/purchaseReturn/record/returnRecord.vue

@ -54,7 +54,8 @@
import {
goHome,
updateTitle,
navigateBack
navigateBack,
deepCopyData
} from '@/common/basic.js';
import {
@ -273,28 +274,30 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.inventoryStatus = detail.inventoryStatus;
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = detail.packingNumber;;
submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber;;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = detail.batch;
detail.toBatch = detail.batch;
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
detail.fromLocationCode = this.fromLocationCode;
detail.toLocationCode = ''; //退
submitItem.fromLocationCode = this.fromLocationCode;
submitItem.toLocationCode = ''; //退
detail.package = null;
subList.push(detail)
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package = "";
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList
this.dataContent.creator = creator;
// this.dataContent.jobNumber = '';
return this.dataContent;
},

4
pages/purchaseReturn/request/returnRequestCreate.vue

@ -219,9 +219,9 @@
purchaseReturnRequestCreate(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购退货申请" + res.data, )
this.showCommitSuccessMessage("提交成功<br>生成采购退货申请<br>" + res.data)
} else {
this.showErrorMessage("提交失败"+res.msg)
this.showErrorMessage("提交失败["+res.msg+"]")
}
}).catch(error => {
uni.hideLoading()

40
pages/putaway/record/putawayRecord.vue

@ -59,8 +59,14 @@
goHome,
updateTitle,
getCurrDateTime,
getPackingNumberAndBatchByList
getPackingNumberAndBatchByList,
deepCopyData
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
@ -236,7 +242,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -311,7 +317,7 @@
putawayRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购上架记录" + res.data, )
this.showCommitSuccessMessage("提交成功<br>生成原料上架记录<br>" + res.data, )
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -359,30 +365,30 @@
},
setRecordParams() {
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.fromWarehouseCode;
var creator = this.$store.state.user.id
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = detail.containerNumber;
var submitItem = deepCopyData(detail)
submitItem.toPackingNumber = info.packingNumber;
submitItem.toBatch = info.batch;
submitItem.toContainerNumber = detail.containerNumber;
detail.fromPackingNumber = info.packingNumber;
detail.fromBatch = info.batch;
detail.fromContainerNumber = detail.containerNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.fromBatch = info.batch;
submitItem.fromContainerNumber = detail.containerNumber;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
// detail.toInventoryStatus = detail.inventoryStatus
// detail.toLocationCode = detail.toLocationCode
detail.package = null;
subList.push(detail)
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.package = "";
subList.push(submitItem)
}
})
})
@ -390,6 +396,8 @@
this.dataContent.toWarehouseCode = subList[0].toWarehouseCode;
}
this.dataContent.subList = subList
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.fromWarehouseCode;
return this.dataContent;
},

16
pages/putaway/request/putawayRequestCreate.vue

@ -52,7 +52,6 @@
<script>
import {
putawayRequestSubmit,
putawayRecordSubmit,
validateItemAndLocation,
getPutawayRecommendLocation
} from '@/api/request2.js';
@ -61,6 +60,7 @@
goHome,
updateTitle,
getCurrDateTime,
deepCopyData,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
@ -68,6 +68,11 @@
getDirectoryItemArray
} from '@/common/directory.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
createItemInfo,
@ -217,7 +222,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -286,7 +291,7 @@
putawayRequestSubmit(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 + "]")
}
@ -308,10 +313,9 @@
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.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
subItem.package = null;
subList.push(subItem)
}

6
pages/query/container.vue

@ -47,6 +47,10 @@
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import locationInfo from '@/mycomponents/location/locationInfo.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -217,7 +221,7 @@
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += Number(res.qty)
temp.qty = calc.add(temp.qty,res.qty)
var item = {
packingNumber: res.packingNumber,
batch: res.batch,

6
pages/query/location.vue

@ -44,6 +44,10 @@
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import locationInfo from '@/mycomponents/location/locationInfo.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -192,7 +196,7 @@
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += Number(res.qty)
temp.qty = calc.add(temp.qty,res.qty)
var item = {
packingNumber: res.packingNumber,
batch: res.batch,

6
pages/query/location_copy.vue

@ -61,6 +61,10 @@
getBalanceByLocationcodeGroup
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
maxPageSize,
goHome
@ -214,7 +218,7 @@
data.list.push(item)
resultlist.push(data)
} else {
temp.qty += Number(res.qty)
temp.qty = calc.add(temp.qty,res.qty)
var item = {
packingNumber: res.packingNumber,
batch: res.batch,

19
pages/repleinsh/coms/comScanReplishPack.vue

@ -106,6 +106,10 @@
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
@ -317,11 +321,14 @@
)
}
} else {
if (this.jobContent.AllowModifyBatch == null) {
if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发料明细,是否要继续发料?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance);
let batch = that.createBatchInfo(label, balance,packageInfo);
if(fromLocation.Batchs.length>0){
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
}
})
@ -348,15 +355,15 @@
}
},
createBatchInfo(data, balance) {
createBatchInfo(data, balance,packageInfo) {
let batch = {
batch: data.lot,
batch: data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),
Records: []
}
let record = this.creatRecord(data, balance);
let record = this.creatRecord(data, balance,packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
return batch;
@ -383,7 +390,7 @@
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},

95
pages/repleinsh/job/repleinshDetail.vue

@ -63,6 +63,10 @@
getDataSource
} from '@/pages/issue/js/issue.js';
import {
calc
} from '@/common/calc.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
@ -252,7 +256,7 @@
},
setParams() {
var subList = []
var commitSubList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => {
@ -260,52 +264,57 @@
item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
subItem.recordList = [];
if (batch.Records.length > 0) {
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 = this
.toLocationCode;
record.supplierCode = r.supplierCode;
//使
if (this.jobContent.useOnTheWayLocation ==
'TRUE') {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;
} else {
var info = getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
if (subItem != undefined) {
if (batch.Records.length > 0) {
subItem.recordList = [];
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.fromPackingNumber = r
.packingNumber;
record.toBatch = info.batch;
}
subItem.recordList.push(record);
})
subList.push(subItem);
record.fromBatch = r.batch;
record.fromContainerNumber = r
.ContainerNumber;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.toLocationCode = this
.toLocationCode;
record.supplierCode = r.supplierCode;
//使
if (this.jobContent
.useOnTheWayLocation ==
'TRUE') {
record.toPackingNumber = r
.packingNumber;
record.toBatch = r.batch;
} else {
var info =
getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch;
}
subItem.recordList.push(record);
})
commitSubList.push(subItem);
}
}
})
})
})
})
this.jobContent.subList = subList
this.jobContent.subList = commitSubList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
@ -353,10 +362,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty,handleQty)
}
})
}
@ -444,7 +453,7 @@
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
if (batch.Records.length > 0) {
scanCount += batch.Records.length
scanCount = calc.add(scanCount,batch.Records.length)
}
})
})

33
pages/repleinsh/record/repleinshRecord.vue

@ -48,6 +48,10 @@
getBalanceByBatchOffShelf
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -233,7 +237,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty, res.qty)
})
this.detailSource.totalQty = totalQty;
},
@ -265,10 +269,10 @@
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty += Number(res.qty)
handleQty = calc.add(handleQty, res.qty)
})
batch.handleQty = handleQty;
itemHandleQty += handleQty;
itemHandleQty = calc.add(itemHandleQty, handleQty)
}
})
}
@ -290,7 +294,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -323,7 +327,7 @@
},
closeScanPopup() {
if(this.$refs.scanPopup!=undefined){
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
@ -406,18 +410,19 @@
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.fromLocationCode = fromLocation.fromLocationCode
record.fromLocationCode = fromLocation
.fromLocationCode
record.supplierCode = r.supplierCode;
//使
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);

41
pages/scrap/record/scrapRecord.vue

@ -19,6 +19,7 @@
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent"
:isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
:isShowToLocation="false"
@removePack="removePack">
</record-com-detail-card>
</view>
@ -55,6 +56,7 @@
import {
goHome,
deepCopyData
} from '@/common/basic.js';
import {
@ -274,30 +276,34 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = detail.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = detail.batch;
detail.toBatch = detail.batch;
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = "";
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = "";
detail.reason = this.reasonCode;
subList.push(detail)
submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(submitItem)
}
})
})
this.dataContent.subList =subList
this.dataContent.creator = creator;
return this.dataContent;
@ -337,12 +343,13 @@
})
},
clearData(){
this.reasonCode = ""
this.reasonCode = "";
this.fromLocationCode = "";
this.reasonText = "";
this.detailSource = [];
this.subList =[];
this.managementList =[];
this.dataContent ={}
this.subList = [];
this.managementList = [];
this.dataContent = {}
},
updateData() {

38
pages/transfer/coms/comTransferRecord.vue

@ -51,6 +51,7 @@
import {
goHome,
deepCopyData,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
@ -338,28 +339,32 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = detail.toLocationCode;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
subList.push(detail)
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(submitItem)
}
})
})
@ -412,6 +417,11 @@
// return
// }
this.toLocationCode = code;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
showCommitSuccessMessage(hint) {

12
pages/transfer/job/transferDetail.vue

@ -49,6 +49,10 @@
import {
getBasicLocationByCode
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
getCurrDateTime,
@ -196,7 +200,7 @@
item.subList.push(newDetail);
items.push(item)
} else {
item.qty += detail.qty
item.qty = calc.add(item.qty,detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
}
@ -221,8 +225,10 @@
createDetailInfo(data) {
data.scaned = false;
// data.record = {};
let detail = data;
return detail;
detail.handleQty = 0,
return detail;
},
calcScanCount(closeScan) {
@ -242,7 +248,7 @@
item.handleQty = 0;
for (let detail of item.subList) {
if (detail.record != undefined) {
item.handleQty += Number(detail.record.qty)
item.handleQty = calc.add(item.handleQty,detail.record.qty)
}
}
}

445
pages/transfer/record/deliverRecord.vue

@ -1,29 +1,462 @@
<template>
<view class="page-wraper">
<comTransferRecord transferType="TransferDeliver"> </comTransferRecord>
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="fromLocationCode==''"></com-blank-view>
</view>
<view class="page-wraper" v-if="fromLocationCode!=''">
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
</view>
</template>
<script>
import comTransferRecord from '@/pages/transfer/coms/comTransferRecord.vue'
import {
transferIssueRecordSubmit
} from '@/api/request2.js';
import {
getPrecisionStrategyList
} from '@/common/balance.js';
import {
goHome,
deepCopyData,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comMessage from '@/mycomponents/common/comMessage.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
comTransferRecord
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
winScanLocation,
comMessage,
winScanPackAndLocation,
recordComDetailCard
},
data() {
return {
id: '',
subList: [], //subList
detailSource: [], //
locationTypeList: [],
fromLocationCode: "",
toLocationCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
managementList: [],
dataContent: {},
toWarehouseCode: ''
};
},
onLoad(option) {
var typeCode = "TransferDeliver"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
onLoad() {},
methods: {
getScanResult(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
newDetail.inventoryStatus = "OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
calcHandleQty() {
calcHandleQty(this.detailSource)
this.$forceUpdate();
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
})
},
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
title: "提交中....",
mask: true
});
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
transferIssueRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成调拨出库记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
})
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.package = "";
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationCode = code;
this.openScanPopup();
},
getToLocationCode(location, code) {
this.toWarehouseCode = location.warehouseCode
// if (this.fromLocationCode == code) {
// uni.showToast({
// title: "[" + this.fromLocationCode + "][" + code + "]",
// duration: 2000
// })
// return
// }
this.toLocationCode = code;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData() {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
}
}
}
</script>
<style>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>

423
pages/transfer/record/receiptRecord.vue

@ -1,29 +1,440 @@
<template>
<view class="page-wraper">
<comTransferRecord transferType="TransferReceipt"> </comTransferRecord>
<view class="">
<com-blank-view @goScan='openScanPopup' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowFromLocation="false"
:isShowToLocation="false"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import comTransferRecord from '@/pages/transfer/coms/comTransferRecord.vue'
import {
transferReceiptRecordSubmit
} from '@/api/request2.js';
import {
getPrecisionStrategyList
} from '@/common/balance.js';
import {
goHome,
deepCopyData,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
export default {
components: {
comTransferRecord
winScanButton,
winScanPack,
requiredLocation,
comBlankView,
comMessage,
recordComDetailCard
},
data() {
return {
id: '',
subList: [], //subList
detailSource: [], //
locationTypeList: [],
toLocationCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
managementList: [],
dataContent: {},
toWarehouseCode: ''
};
},
onLoad(option) {
var typeCode = "TransferReceipt"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {},
onPullDownRefresh() {},
onLoad() {},
methods: {
getScanResult(result) {
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
if (res.itemCode == label.itemCode) {
return res
}
})
if (item == undefined) {
var itemp = createItemInfo(label, pack);
let newDetail = createDetailInfo(label, pack); //
newDetail.inventoryStatus = "OK"
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == label.packingNumber &&
r.batch == label.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(label, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
}
this.calcHandleQty();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
calcHandleQty() {
calcHandleQty(this.detailSource)
this.$forceUpdate();
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
commit() {
if (this.toLocationCode == "") {
this.showMessage("请先选择目标库位")
return;
}
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
title: "提交中....",
mask: true
});
this.managementList = [];
var precisionStrategParams = this.setPrecisionStrategParams()
getPrecisionStrategyList(precisionStrategParams, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交" + JSON.stringify(params))
transferReceiptRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成调拨入库记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
})
} else {
this.showErrorMessage("没有要提交的数据,请先扫描")
}
},
setPrecisionStrategParams() {
var itemList = []
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.toLocationCode = this.toLocationCode;
var filterResult = itemList.filter(res => {
if (res.itemCode == item.itemCode &&
detail.toLocationCode == res.locationCode) {
return res
}
})
//
if (filterResult.length == 0) {
var result = {
itemCode: item.itemCode,
locationCode: detail.toLocationCode
}
itemList.push(result)
}
}
})
})
return itemList;
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = detail.toLocationCode;
submitItem.qty = detail.handleQty != 0 ? detail.handleQty : detail.qty;
submitItem.package = "";
subList.push(submitItem)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
this.dataContent.fromWarehouseCode = this.detailSource[0].subList[0].warehouseCode;
this.dataContent.toWarehouseCode = this.toWarehouseCode;
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
getLocation(location, code) {
},
getToLocationCode(location, code) {
this.toWarehouseCode = location.warehouseCode
// if (this.fromLocationCode == code) {
// uni.showToast({
// title: "[" + this.fromLocationCode + "][" + code + "]",
// duration: 2000
// })
// return
// }
this.toLocationCode = code;
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData() {
this.fromLocationCode = '';
this.subList = [];
this.detailSource = [];
this.toLocationCode = '';
this.dataContent = {}
this.toWarehouseCode = ""
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
}
}
}
</script>
<style>
<style scoped lang="scss">
page {
width: 100%;
height: 100%;
background-color: #fff;
}
.page-wraper {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
.page-main {
flex: 1;
position: relative;
}
.page-main-scroll {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.page-main-list {
/* height: 80rpx;
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>

39
pages/unPlanned/record/issueRecord.vue

@ -71,7 +71,8 @@
import {
goHome,
updateTitle
updateTitle,
deepCopyData
} from '@/common/basic.js';
export default {
@ -233,27 +234,31 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
var submitItem = deepCopyData(detail)
submitItem.itemCode = detail.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = detail.packingNumber;
submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber;
detail.fromContainerNumber = detail.containerNumber;
detail.toContainerNumber = detail.containerNumber
submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber
detail.fromBatch = detail.batch;
detail.toBatch = detail.batch;
submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch;
detail.fromLocationCode = detail.locationCode;
detail.toLocationCode = "";
submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = "";
detail.reason = this.reasonCode;
subList.push(detail)
submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(submitItem)
}
})
})
@ -274,7 +279,7 @@
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
})
},
clearData(){

38
pages/unPlanned/record/receiptRecord.vue

@ -64,9 +64,14 @@
import {
getBusinessType,
} from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
deepCopyData,
getPackingNumberAndBatchByList
} from '@/common/basic.js';
@ -182,6 +187,7 @@
detail.scaned = true;
// Object.assign(detail, label)
detail.qty = Number(label.qty)
detail.handleQty = 0,
detail.inventoryStatus = "OK"
detail.stdPackQty = pack.stdPackQty;
detail.stdPackUnit = pack.stdPackUnit;
@ -197,7 +203,7 @@
item.qty = 0;
for (let detail of item.subList) {
if (detail != undefined) {
item.qty += Number(detail.qty)
item.qty = calc.add(item.qty,detail.qty)
}
}
}
@ -308,31 +314,35 @@
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var submitItem = deepCopyData(detail)
var info = getPackingNumberAndBatchByList(this.managementList, detail.label.itemCode,
detail.label.packingNumber, detail.toLocationCode, detail.label.batch);
detail.itemCode = detail.package.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
submitItem.itemCode = detail.package.itemCode;
submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2;
detail.inventoryStatus = detail.inventoryStatus;
submitItem.inventoryStatus = detail.inventoryStatus;
detail.fromPackingNumber = info.packingNumber;
detail.toPackingNumber = info.packingNumber;
submitItem.fromPackingNumber = info.packingNumber;
submitItem.toPackingNumber = info.packingNumber;
// detail.fromContainerNumber = detail.containerNumber;
// detail.toContainerNumber = detail.containerNumber
detail.fromBatch = info.batch;
detail.toBatch = info.batch;
submitItem.fromBatch = info.batch;
submitItem.toBatch = info.batch;
submitItem.fromLocationCode = "";
submitItem.toLocationCode = detail.toLocationCode;
detail.fromLocationCode = "";
detail.toLocationCode = detail.toLocationCode;
submitItem.reason = this.reasonCode;
detail.reason = this.reasonCode;
submitItem.qty = detail.handleQty!=0?detail.handleQty:detail.qty;
submitItem.package ="";
subList.push(detail)
subList.push(submitItem)
}
})
})

41
pages/unPlanned/request/receiptRequestCreate.vue

@ -9,9 +9,10 @@
<view class="" style="margin-left: 20rpx; margin-top: 20rpx;margin-bottom:20rpx;font-size: 30rpx;">
目标库位{{detailSource.toLocationCode}}
</view>
<view class="flex u-col-center" style="width: 100%;background-color:#fff;margin-bottom: 20rpx;margin-top: 20rpx;">
<view class="" style="margin-left: 20rpx; font-size: 30rpx;flex-shrink: 0;">入库原因</view>
<view style="width: 100%">
<view class="flex u-col-center"
style="width: 100%;background-color:#fff;margin-bottom: 20rpx;margin-top: 20rpx;">
<view class="" style="margin-left: 20rpx; font-size: 30rpx;flex-shrink: 0;">入库原因</view>
<view style="width: 100%">
<uni-data-picker style="background-color:#fff;margin-right: 20rpx;" class='uni-data-picker'
placeholder="请选择入库原因" popup-title="入库原因" :localdata="reasonList" @change="reasonChange">
</uni-data-picker>
@ -21,9 +22,9 @@
<u-line />
<view v-for="(item, index) in detailSource.subList" :key="index">
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
<u-line />
<item-qty :dataContent="item" :isShowStdPack="false">
</item-qty>
<u-line />
</view>
<button class="btn_add" @click="goScan(false)">+去添加</button>
</view>
@ -46,6 +47,10 @@
unPlannedReceiptRequestCreate
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
goHome,
updateTitle,
@ -106,12 +111,12 @@
if (this.detailSource.subList.length == 0) {
this.detailSource = {
totalQty: 0,
toLocationCode:item.toLocationCode,
toLocationCode: item.toLocationCode,
subList: []
}
var subItem = {
toLocationCode:item.toLocationCode,
toLocationCode: item.toLocationCode,
itemCode: item.itemCode,
itemName: item.itemName,
qty: item.qty,
@ -138,7 +143,7 @@
} else {
//
result[0].qty += item.qty
result[0].qty = calc.add(result[0].qty,item.qty)
}
}
@ -149,7 +154,7 @@
caclcQty() {
var totalQty = 0;
this.detailSource.subList.forEach(res => {
totalQty += res.qty
totalQty = calc.add(totalQty,res.qty)
})
this.detailSource.totalQty = totalQty;
},
@ -181,14 +186,14 @@
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";
console.log("",getBatch())
subList.push(detail)
})
detail.toLocationCode = this.detailSource.toLocationCode;
detail.reason = this.reasonCode;
detail.containerNumber = "";
detail.batch = getBatch();
detail.inventoryStatus = "OK";
console.log("", getBatch())
subList.push(detail)
})
this.dataContent.subList = subList
this.dataContent.status = 1;
this.dataContent.requestTime = getCurrDateTimes();

Loading…
Cancel
Save