Browse Source

修改直接采购上架,计划外出入库,物料转隔离,库存转移, 报废出库,调拨出入库

intex_online20241111
lijuncheng 5 months ago
parent
commit
0bf1a07215
  1. 8
      .env.development
  2. 3
      .env.hella13
  3. 3
      .env.hella14
  4. 3
      .env.hella15
  5. 3
      .env.hella16
  6. 5
      .env.hella8
  7. 3
      .env.hella9
  8. 3
      .env.production
  9. 9
      src/mycomponents/record/recordComDetailCard.vue
  10. 11
      src/pages/inventoryMove/coms/comMoveRecord.vue
  11. 50
      src/pages/inventoryMove/record/okToHoldRecord.vue
  12. 19
      src/pages/putaway/record/putawayRecord.vue
  13. 66
      src/pages/scrap/record/scrapRecord.vue
  14. 80
      src/pages/transfer/record/deliverRecord.vue
  15. 55
      src/pages/transfer/record/receiptRecord.vue
  16. 141
      src/pages/unPlanned/record/issueRecord.vue
  17. 63
      src/pages/unPlanned/record/receiptRecord.vue

8
.env.development

@ -1,11 +1,15 @@
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api # VITE_BASE_URL=http://localhost:12080/admin-api
VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置 # 租户配置
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' VITE_TENANT='[{"text":"英泰","value":1},{"text":"长春2379","value":3}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=true VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella13

@ -9,3 +9,6 @@ VITE_isDevelopment=false
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.13:90' VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella14

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.21.32.14:90' VITE_JMREPORT_BASE_URL='http://172.21.32.14:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella15

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com' VITE_JMREPORT_BASE_URL='https://scp.faway-hella.com'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella16

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com' VITE_JMREPORT_BASE_URL='https://scptest.faway-hella.com'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

5
.env.hella8

@ -9,4 +9,7 @@ VITE_isDevelopment=false
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.hella9

@ -9,3 +9,6 @@ VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

3
.env.production

@ -10,3 +10,6 @@ VITE_isDevelopment=false
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' VITE_JMREPORT_BASE_URL='http://172.22.32.8:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

9
src/mycomponents/record/recordComDetailCard.vue

@ -32,7 +32,7 @@
</view> </view>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" ></balance-qty-edit> <balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :queryBalance="queryBalance" ></balance-qty-edit>
<record-detail-popup ref="recordDetailPopup"></record-detail-popup> <record-detail-popup ref="recordDetailPopup"></record-detail-popup>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -121,7 +121,12 @@
allowModifyLocation: { allowModifyLocation: {
type: Boolean, type: Boolean,
default: false default: false
} },
queryBalance: {
type: Boolean,
default: true
},
}, },
watch: { watch: {

11
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -76,8 +76,11 @@
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty, calcHandleQty,
calcHandleQtyAdd
} from '@/common/record.js'; } from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
export default { export default {
components: { components: {
@ -330,7 +333,6 @@
} }
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
newDetail.handleQty = 0
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
@ -355,15 +357,14 @@
if (newDetail.packingNumber == '') { if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number; newDetail.packingNumber = pack.number;
} }
newDetail.handleQty = 0
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
} }
} }
calcHandleQtyAdd(this.detailSource,result.label); calcHandleQty(this.detailSource);
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {

50
src/pages/inventoryMove/record/okToHoldRecord.vue

@ -1,60 +1,28 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<okToHoldRecordScan :formField='formField' :allData='data' :labelWidth='140' :formItemBorder='true'></okToHoldRecordScan> <comMoveRecord :myTitle="title" businessTypeCode='OkToHold' > </comMoveRecord>
</view> </view>
</template> </template>
<script> <script>
import okToHoldRecordScan from '@/pages/inventoryMove/coms/okToHoldRecordScan.vue' import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
// import {fromLocationField} from '@/api/data.js'
export default { export default {
components: { components: {
okToHoldRecordScan comMoveRecord
}, },
data() { data() {
return { return {
formField: [{ title:''
label: '来源库位',
field: 'fromLocationCode',
form:{
type:'text',
}
},{
label: '零件',
field: 'itemCode',
form:{
type:'select',
dictType:[{
}]
}
},{
label: '批次',
field: 'batch',
form:{
type:'select',
}
},{
label: '数量',
field: 'qty',
form:{
type:'select',
}
}],
data:{
fromLocationCode:'12122',
itemCode:'233',
batch:'111',
qty:22,
}
} }
}, },
onLoad(option) { onLoad(option){
this.title = option.title
}, },
methods: {} methods: {
}
} }
</script> </script>
<style> <style>
</style> </style>

19
src/pages/putaway/record/putawayRecord.vue

@ -91,7 +91,6 @@
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty, calcHandleQty,
calcHandleQtyAdd
} from '@/common/record.js'; } from '@/common/record.js';
import { import {
@ -99,6 +98,10 @@
getPrecisionStrategyList, getPrecisionStrategyList,
getPrecisionStrategyParams getPrecisionStrategyParams
} from '@/common/balance.js'; } from '@/common/balance.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -170,7 +173,7 @@
mounted() {}, mounted() {},
methods: { methods: {
getScanResult(result,managementType) { getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){ if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result) this.setDataBatch(result)
@ -206,11 +209,8 @@
newDetail.poNumber=poNumber; newDetail.poNumber=poNumber;
newDetail.supplierCode=supplierCode; newDetail.supplierCode=supplierCode;
newDetail.fromInventoryStatus = balance.inventoryStatus; newDetail.fromInventoryStatus = balance.inventoryStatus;
newDetail.handleQty =0;
newDetail.balanceQty =result.balance.qty;
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
calcHandleQtyAdd(this.detailSource,result.label);
}) })
} else { } else {
@ -231,24 +231,19 @@
newDetail.poNumber=poNumber; newDetail.poNumber=poNumber;
newDetail.supplierCode=supplierCode; newDetail.supplierCode=supplierCode;
newDetail.fromInventoryStatus = balance.inventoryStatus; newDetail.fromInventoryStatus = balance.inventoryStatus;
newDetail.handleQty =0;
newDetail.balanceQty =result.balance.qty;
if(item.subList&&item.subList.length>0){ if(item.subList&&item.subList.length>0){
if(item.subList[0].batch!=newDetail.batch){ if(item.subList[0].batch!=newDetail.batch){
this.showErrorMessage("扫描的批次是["+newDetail.batch+"],请扫描["+item.subList[0].batch+"的批次的箱码") this.showErrorMessage("扫描的批次是["+newDetail.batch+"],请扫描["+item.subList[0].batch+"的批次的箱码")
} }
}else { }else {
item.subList.push(newDetail); item.subList.push(newDetail);
calcHandleQtyAdd(this.detailSource,result.label);
} }
}); });
} else { } else {
if (detail.scaned == true) { detail.handleQty =calc.add(detail.handleQty, result.label.handleQty)
calcHandleQtyAdd(this.detailSource,result.label);
// this.showErrorMessage( "[" + balance.batch + "]")
}
} }
} }
this.calcHandleQty(this.detailSource)
}, },
setData(result){ setData(result){

66
src/pages/scrap/record/scrapRecord.vue

@ -17,7 +17,13 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :settingParam="dataContent" <record-com-detail-card-batch :dataContent="item" :index="index" :isShowFromLocation="true"
:isShowParentToLocation="false"
@removeItem="removeItem(index,item)" :isShowToLocation="false" @updateData="updateData"
@removePack="removePack"
v-if="managementType == 'BY_BATCH'||managementType =='BY_QUANTITY' ">
</record-com-detail-card-batch>
<record-com-detail-card v-else :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData" :isShowFromLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData"
:isShowToLocation="false" :isShowToLocation="false"
@removePack="removePack"> @removePack="removePack">
@ -59,6 +65,10 @@
deepCopyData deepCopyData
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
calc
} from '@/common/calc'
import { import {
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray, getDirectoryItemArray,
@ -69,7 +79,8 @@
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty calcHandleQty,
calcHandleQtyAdd
} from '@/common/record.js'; } from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
@ -78,6 +89,7 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue'
export default { export default {
components: { components: {
@ -86,7 +98,8 @@
comBlankView, comBlankView,
winScanLocation, winScanLocation,
winScanPackAndLocation, winScanPackAndLocation,
recordComDetailCard recordComDetailCard,
recordComDetailCardBatch
}, },
data() { data() {
return { return {
@ -102,6 +115,7 @@
businessType: {}, businessType: {},
reasonList: [], reasonList: [],
reasonText: "", reasonText: "",
managementType:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -137,7 +151,50 @@
}, },
methods: { methods: {
getScanResult(result) { getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
console.log("模式"+managementTypeParams)
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setDataBatch(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); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (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 {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty(this.detailSource)
},
setData(result){
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
@ -170,7 +227,6 @@
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
showErrorMessage(message) { showErrorMessage(message) {

80
src/pages/transfer/record/deliverRecord.vue

@ -8,7 +8,17 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowLocation="true" <record-com-detail-card-batch :dataContent="item" :index="index" :settingParam="dataContent"
:isShowFromLocation="false" @removeItem="removeItem(index,item)"
:isShowModifedLocation="false"
:isShowParentToLocation="false"
@updateData="updateData"
@editLocation="showScanToLocation"
@removePack="removePack"
v-if="managementType == 'BY_BATCH'||managementType =='BY_QUANTITY' ">
</record-com-detail-card-batch>
<record-com-detail-card v-else :dataContent="item" :index="index" :isShowLocation="true"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -32,7 +42,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation='false'></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
@ -63,8 +73,11 @@
getBusinessType, getBusinessType,
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty calcHandleQty,
} from '@/common/record.js'; } from '@/common/record.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -73,7 +86,8 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue'
export default { export default {
components: { components: {
winScanButton, winScanButton,
@ -82,7 +96,8 @@
comBlankView, comBlankView,
winScanLocation, winScanLocation,
winScanPackAndLocation, winScanPackAndLocation,
recordComDetailCard recordComDetailCard,
recordComDetailCardBatch
}, },
data() { data() {
return { return {
@ -98,7 +113,8 @@
businessType: {}, businessType: {},
managementList: [], managementList: [],
dataContent: {}, dataContent: {},
toWarehouseCode: '' toWarehouseCode: '',
managementType:""
}; };
}, },
@ -131,7 +147,17 @@
onPullDownRefresh() {}, onPullDownRefresh() {},
methods: { methods: {
getScanResult(result) { getScanResult(result,managementTypeParams) {
this.managementType = managementTypeParams
if(managementTypeParams == "BY_BATCH" ||managementTypeParams == "BY_QUANTITY" ){
this.setDataBatch(result)
}else{
this.setData(result)
}
},
setData(result){
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
@ -166,6 +192,46 @@
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
setDataBatch(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.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 {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty(this.detailSource)
},
showScanToLocation(item) {
this.editItem = item;
setTimeout(r => {
this.$refs.scanToLocationCode.openScanPopup();
})
},
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {

55
src/pages/transfer/record/receiptRecord.vue

@ -10,6 +10,9 @@
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" :isShowFromLocation="false" <record-com-detail-card :dataContent="item" :index="index" :isShowFromLocation="false"
:isShowToLocation="false" :isShowToLocation="false"
:isShowParentToLocation="false"
:allowModifyQty="true"
:queryBalance="false"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
@ -63,6 +66,10 @@
createDetailInfo, createDetailInfo,
calcHandleQty calcHandleQty
} from '@/common/record.js'; } from '@/common/record.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -90,7 +97,8 @@
businessType: {}, businessType: {},
managementList: [], managementList: [],
dataContent: {}, dataContent: {},
toWarehouseCode: '' toWarehouseCode: '',
managementType:import.meta.env.VITE_MANAGE_MODEL
}; };
}, },
@ -124,6 +132,17 @@
methods: { methods: {
getScanResult(result) { getScanResult(result) {
var managementTypeParams =this.managementType
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setData(result){
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
@ -155,6 +174,37 @@
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
setDataBatch(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 {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty();
},
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
@ -339,9 +389,6 @@
}); });
}, },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() { afterCloseMessage() {
this.scanPopupGetFocus(); this.scanPopupGetFocus();

141
src/pages/unPlanned/record/issueRecord.vue

@ -7,11 +7,17 @@
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<uni-data-picker style="padding: 20rpx; background-color:#fff;" class='uni-data-picker' <uni-data-picker style="padding: 20rpx; background-color:#fff;" class='uni-data-picker'
placeholder="请选择出库原因" popup-title="出库原因" :localdata="reasonList" @change="reasonChange"> placeholder="请选择出库原因" popup-title="出库原因" :localdata="reasonList" @change="reasonChange">
</uni-data-picker> </uni-data-picker>
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<record-com-detail-card :dataContent="item" :index="index" <record-com-detail-card-batch :dataContent="item" :index="index" :isShowFromLocation="false"
:isShowParentToLocation="false"
@removeItem="removeItem(index,item)" :isShowToLocation="false" @updateData="updateData"
@removePack="removePack"
v-if="managementType == 'BY_BATCH'||managementType =='BY_QUANTITY' ">
</record-com-detail-card-batch>
<record-com-detail-card v-else :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" :isShowLocation="true" @removeItem="removeItem(index,item)" @updateData="updateData" :isShowLocation="true"
@removePack="removePack" :isShowToLocation="false"> @removePack="removePack" :isShowToLocation="false">
</record-com-detail-card> </record-com-detail-card>
@ -48,6 +54,7 @@
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import recordComDetailCardBatch from '@/mycomponents/record/recordComDetailCardBatch.vue'
import { import {
unPlannedIssueRecordSubmit unPlannedIssueRecordSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -64,8 +71,12 @@
import { import {
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty calcHandleQty,
} from '@/common/record.js'; } from '@/common/record.js';
import {
calc
} from '@/common/calc.js';
import { import {
goHome, goHome,
@ -79,7 +90,8 @@
comBlankView, comBlankView,
winScanLocation, winScanLocation,
winScanPackAndLocation, winScanPackAndLocation,
recordComDetailCard recordComDetailCard,
recordComDetailCardBatch
}, },
props: {}, props: {},
data() { data() {
@ -91,9 +103,11 @@
businessType: {}, // businessType: {}, //
detailSource: [], // detailSource: [], //
reasonText: "", reasonText: "",
reasonCode:"", reasonCode: "",
reasonList: [], reasonList: [],
dataContent:{} dataContent: {},
managementType:""
} }
}, },
@ -111,8 +125,7 @@
}); });
}, },
onLoad(option) { onLoad(option) {},
},
methods: { methods: {
openScanPopup() { openScanPopup() {
@ -135,11 +148,55 @@
this.fromLocationCode = location.code; this.fromLocationCode = location.code;
this.openScanPopup(); this.openScanPopup();
}, },
getScanResult(result) { getScanResult(result,managementTypeParams) {
this.getDataSource(result) this.managementType = managementTypeParams
console.log(managementTypeParams)
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
}, },
getDataSource(result) { setDataBatch(result) {
let balance = result.balance;
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(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
// newDetail.inventoryStatus ="OK";
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.packGetFocus()
} else {
var detail = item.subList.find(r => {
if (r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
return r;
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
this.packGetFocus()
}else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
}
}
this.calcHandleQty(this.detailSource)
},
setData(result) {
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
@ -177,9 +234,9 @@
this.calcHandleQty(); this.calcHandleQty();
}, },
packGetFocus(){ packGetFocus() {
if(this.$refs.scanPopup){ if (this.$refs.scanPopup) {
this.$refs.scanPopup.packGetFocus() this.$refs.scanPopup.packGetFocus()
} }
}, },
@ -216,20 +273,20 @@
this.showErrorMessage("请选择出库原因") this.showErrorMessage("请选择出库原因")
return; return;
} }
var params =this.setParams() var params = this.setParams()
console.log("提交" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
unPlannedIssueRecordSubmit(params).then(res => { unPlannedIssueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成采购收货记录\n" + res.data ) this.showCommitSuccessMessage("提交成功\n生成计划外出库记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}, },
setParams() { setParams() {
var subList = [] var subList = []
@ -242,24 +299,24 @@
submitItem.itemName = detail.package.itemName; submitItem.itemName = detail.package.itemName;
submitItem.itemDesc1 = detail.package.itemDesc1; submitItem.itemDesc1 = detail.package.itemDesc1;
submitItem.itemDesc2 = detail.package.itemDesc2; submitItem.itemDesc2 = detail.package.itemDesc2;
submitItem.inventoryStatus = detail.inventoryStatus; submitItem.inventoryStatus = detail.inventoryStatus;
submitItem.fromPackingNumber = detail.packingNumber; submitItem.fromPackingNumber = detail.packingNumber;
submitItem.toPackingNumber = detail.packingNumber; submitItem.toPackingNumber = detail.packingNumber;
submitItem.fromContainerNumber = detail.containerNumber; submitItem.fromContainerNumber = detail.containerNumber;
submitItem.toContainerNumber = detail.containerNumber submitItem.toContainerNumber = detail.containerNumber
submitItem.fromBatch = detail.batch; submitItem.fromBatch = detail.batch;
submitItem.toBatch = detail.batch; submitItem.toBatch = detail.batch;
submitItem.fromLocationCode = detail.locationCode; submitItem.fromLocationCode = detail.locationCode;
submitItem.toLocationCode = ""; submitItem.toLocationCode = "";
submitItem.reason = this.reasonCode; submitItem.reason = this.reasonCode;
submitItem.qty = detail.handleQty; submitItem.qty = detail.handleQty;
submitItem.package =""; submitItem.package = "";
submitItem.detailDataType = 1; submitItem.detailDataType = 1;
subList.push(submitItem) subList.push(submitItem)
} }
@ -270,7 +327,7 @@
this.dataContent.creator = creator; this.dataContent.creator = creator;
return this.dataContent; return this.dataContent;
}, },
reasonChange(e) { reasonChange(e) {
if (e.detail.value.length == 0) { if (e.detail.value.length == 0) {
this.reasonCode = "" this.reasonCode = ""
@ -282,20 +339,20 @@
}, },
showCommitSuccessMessage(hint) { showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData(); this.clearData();
}) })
}, },
clearData(){ clearData() {
this.reasonCode = "" this.reasonCode = ""
this.reasonText = ""; this.reasonText = "";
this.detailSource = []; this.detailSource = [];
this.managementList =[]; this.managementList = [];
this.dataContent ={} this.dataContent = {}
} }
} }
} }
</script> </script>
<style> <style>
</style> </style>

63
src/pages/unPlanned/record/receiptRecord.vue

@ -14,8 +14,11 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-receipt-record :dataContent="item" @removeItem="removeItem(index,item)" <com-receipt-record
@updateData="updateData" :isShowLocation="false" @removePack="removePack"> :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData"
:queryBalance="false"
:isShowLocation="false" @removePack="removePack">
</com-receipt-record> </com-receipt-record>
</view> </view>
<view class='split_line'></view> <view class='split_line'></view>
@ -105,7 +108,8 @@
reasonList: [], reasonList: [],
dataContent: {}, dataContent: {},
managementList: [], managementList: [],
toLocationAreaTypeList:[] toLocationAreaTypeList:[],
managementType:import.meta.env.VITE_MANAGE_MODEL
} }
}, },
@ -122,7 +126,8 @@
}); });
}, },
onLoad(option) {}, onLoad(option) {
},
methods: { methods: {
openScanPopup() { openScanPopup() {
@ -132,6 +137,16 @@
this.toLocationCode = code; this.toLocationCode = code;
}, },
getScanResult(result) { getScanResult(result) {
var managementTypeParams =this.managementType
if (managementTypeParams == "BY_BATCH" || managementTypeParams == "BY_QUANTITY") {
this.setDataBatch(result)
} else {
this.setData(result)
}
},
setData(result){
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
@ -153,7 +168,7 @@
return r; return r;
} }
}) })
if (detail == undefined) { if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
@ -162,11 +177,45 @@
if (detail.scaned) { if (detail.scaned) {
this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描") this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描")
} }
}
}
this.calcHandleQty();
},
setDataBatch(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 = this.createItemInfo(label, pack);
let newDetail = this.createDetailInfo(label, pack);
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.getfocus()
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == pack.number &&
r.batch == pack.batch) {
return r;
}
})
if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail);
this.getfocus()
} else {
detail.handleQty =calc.add(detail.handleQty, result.label.qty)
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
getfocus(){ getfocus(){

Loading…
Cancel
Save