diff --git a/fe/PDA/api/index.js b/fe/PDA/api/index.js
index 0db640377..f7ee992d6 100644
--- a/fe/PDA/api/index.js
+++ b/fe/PDA/api/index.js
@@ -1327,6 +1327,19 @@ export const getDictByCode = (code) => request(
data: {},
method: "get"
});
+//生成新的箱码
+export const generateNewPacking = (count,params) => request(
+ devUrl + "/api/pda/label/inventorylabel/generate-and-create/many/" + count, { //
+ data: params,
+ method: "post"
+ })
+
+//拆箱码
+export const unPacking = (params) => request(
+ devUrl + "/api/pda/store/transfer-note/split-packing", { //
+ data: params,
+ method: "post"
+ })
//直接发料
export const issueDirect = (params) => request(
diff --git a/fe/PDA/common/new_style.css b/fe/PDA/common/new_style.css
index d4f5c8dec..492cf0e9d 100644
--- a/fe/PDA/common/new_style.css
+++ b/fe/PDA/common/new_style.css
@@ -1887,7 +1887,7 @@ uni-modal .uni-modal__hd {
color: #fff;
text-align: center;
width: 150rpx;
- margin:0 20rpx 20rpx;
+ margin:0 10rpx 10rpx;
}
.btn_single_after {
opacity: 0.7;
diff --git a/fe/PDA/mycomponents/coms/comUnPacking.vue b/fe/PDA/mycomponents/coms/comUnPacking.vue
index 0cb495bea..2c839e659 100644
--- a/fe/PDA/mycomponents/coms/comUnPacking.vue
+++ b/fe/PDA/mycomponents/coms/comUnPacking.vue
@@ -22,7 +22,6 @@
-
@@ -34,6 +33,11 @@
import {
showErrorMsg,
} from '@/common/basic.js';
+ import {
+ generateNewPacking,
+ unPacking,
+ getInventoryLabel
+ } from '@/api/index.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'
export default {
@@ -61,6 +65,7 @@
default: true
},
dataContent: {},
+ jobContent:{}
}
},
created() {
@@ -87,7 +92,8 @@
this.$refs['popupqtyedit'].open("center");
},
//qty当前数量,vaildqty校验的最大数量 , isZero数量是否允许为0
- openPopup3(item, qty, vaildqty, isZero) {
+ openPopup3(jobContent,item, qty, vaildqty, isZero) {
+ this.jobContent =jobContent
this.dataContent = item
this.value = qty;
this.defaultValue = vaildqty;
@@ -128,12 +134,10 @@
this.showMessage('数量不能小于0');
that.value = that.value;
} else {
- that.$emit("getvalue", qty);
- that.$refs['popupqtyedit'].close();
+ this.getDataInfo(qty)
}
} else {
- that.$emit("getvalue", qty);
- that.$refs['popupqtyedit'].close();
+ this.getDataInfo(qty)
}
}
} else {
@@ -146,18 +150,156 @@
this.showMessage('数量不能小于0');
that.value = that.defaultValue;
} else {
- that.$emit("getvalue", qty);
- that.$refs['popupqtyedit'].close();
+ this.getDataInfo(qty)
}
} else {
- that.$emit("getvalue", qty);
- that.$refs['popupqtyedit'].close();
+ this.getDataInfo(qty)
}
}
}
},
+ callBack(qty){
+ var data =this.dataContent;
+ var params = {
+ fullBarcodeString:data.handledPackingCode ,
+ itemCode: data.itemCode,
+ itemName: data.itemName,
+ itemDesc1:data.itemDesc1 ,
+ itemDesc2: data.itemDesc2,
+ lot: data.handledLot,
+ supplierBatch: data.handledSupplierBatch,
+ arriveDate: data.handledArriveDate,
+ produceDate: data.handledProduceDate,
+ expireDate:data.handledExpireDate ,
+ stdPackQty: data.stdPackQty,
+ uom: data.uom,
+ qty: data.handledQty,
+ labelStatus: 1,
+ recommendLocationCode:data.handledToLocationCode,
+ locationErpCode: data.handledToLocationErpCode,
+ containerCode:data.handledContainerCode ,
+ supplierCode:this.jobContent.supplierCode ,
+ poNumber:data.poNumber,
+ rpNumber:this.jobContent.rpNumber ,
+ asnNumber: this.jobContent.asnNumber,
+ qLevel: "",
+ qualityFile:"" ,
+ prodLine: "",
+ team: "",
+ shift: "",
+ specifications:"" ,
+ supplierName: this.jobContent.supplierName,
+ supplierSimpleName: "",
+ supplierItemCode:"",
+ supplierItemName: "",
+ labelType: 1,
+ planArriveDate: this.jobContent.planArriveDate,
+ remark: data.remark
+ }
+
+
+ generateNewPacking(qty,params).then(res=>{
+ if(res){
+ var unPackingParams =this.setUnPackingParams(qty)
+ unPacking(unPackingParams).then(res=>{
+ this.$emit("getvalue", qty);
+ this.$refs['popupqtyedit'].close();
+ }).catch(error=>{
+ this.showMessage(error.message)
+ })
+ }else {
+ this.showMessage("生成新箱码失败")
+ }
+ }).catch(error=>{
+ this.showMessage(error.message)
+ })
+
+ },
+
+ async getDataInfo(qty){
+ try{
+ var labelData = await getInventoryLabel(this.dataContent.handledPackingCode)
+
+ var newPackingCodeParam = this.setNewPackingCodeParam(labelData,qty)
+ var newPackingCodeData = await generateNewPacking(1,newPackingCodeParam);
+ var unPackingParams = this.setUnPackingParams(labelData,qty,newPackingCodeData[0].code)
+ var unPackingData = await unPacking(unPackingParams)
+ }catch(error){
+ this.showMessage(error)
+ }
+
+
+ },
+
+ setNewPackingCodeParam(labelData,qty){
+ var params =labelData;
+ params.qty = qty;
+ return params;
+ },
+
showMessage(message) {
this.$refs.comMessage.showMessage(message);
+ },
+
+
+
+ setUnPackingParams(labelData,qty,newPackingCode){
+ var data = labelData;
+ var itemData =this.dataContent;
+ var param = {
+ tenantId: data.tenantId,
+ remark: "",
+ extraProperties: {},
+ worker: localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
+ activeDate: data.arriveDate,
+ confirmed: true,
+ confirmTime: data.arriveDate,
+ requestNumber:"",
+ jobNumber: "",
+ type: "SplitPacking",
+ useOnTheWayLocation: false,
+ details: [
+ {
+ remark: itemData.remark,
+ itemCode: itemData.itemCode,
+ itemName:itemData.itemName,
+ itemDesc1: itemData.itemDesc1,
+ itemDesc2:itemData.itemDesc2,
+ uom: itemData.uom,
+ qty: qty,
+ stdPackQty: itemData.stdPackQty,
+ fromPackingCode: itemData.recommendPackingCode,
+ fromContainerCode: itemData.recommendContainerCode,
+ fromLocationCode: itemData.recommendToLocationCode,
+ fromLocationArea: itemData.recommendToLocationArea,
+ fromLocationGroup: itemData.recommendToLocationGroup,
+ fromLocationErpCode: itemData.recommendToLocationErpCode,
+ fromWarehouseCode: itemData.recommendToWarehouseCode,
+ fromLot: itemData.recommendLot,
+ fromStatus: 1,
+
+ toPackingCode: newPackingCode,
+ toContainerCode: itemData.handledContainerCode,
+ toLocationCode: itemData.handledToLocationCode,
+ toLocationArea: itemData.handledToLocationArea,
+ toLocationGroup: itemData.handledToLocationGroup,
+ toLocationErpCode: itemData.handledToLocationErpCode,
+ toWarehouseCode: itemData.handledToWarehouseCode,
+ toLot: itemData.handledLot,
+
+ toStatus: 1,
+ supplierBatch: data.supplierBatch,
+ arriveDate: data.arriveDate,
+ produceDate: data.produceDate,
+ expireDate: data.expireDate,
+
+ onTheWayLocationCode: "",
+ reason: ""
+ }
+ ]
+ }
+
+ return param;
}
}
}
diff --git a/fe/PDA/mycomponents/wincom/winScanByPosition.vue b/fe/PDA/mycomponents/wincom/winScanByPosition.vue
index ac0262f48..0a6d140bc 100644
--- a/fe/PDA/mycomponents/wincom/winScanByPosition.vue
+++ b/fe/PDA/mycomponents/wincom/winScanByPosition.vue
@@ -74,34 +74,47 @@
this.showMessage("标签格式不正确")
return;
}
- // uni.showLoading({
- // title: '扫描中...',
- // mask: true
- // })
- var data =
- {
- code: "W19",
- partCode: "TMDLYA0AFM6A",
- partName: "P000000000000015",
- partDesc: "MY前保总成件售后件(冲孔)",
- basicUom: "PC",
- locationCode: "W",
- locationName: "原物料库位",
- stdPackQty: 100,
- remark: null,
- tenantId: null,
- extraProperties: {},
- concurrencyStamp: "b3f2cf7ba3e14166bb97dac768d91741",
- lastModificationTime: null,
- lastModifierId: null,
- creationTime: "2024-02-28T14:47:08.6878607",
- creatorId: null,
- qty:0,
- id: "4c40f72b-a86d-54be-aed2-3a1100a46436"
- }
- this.scanResult = data;
- this.callBack()
- this.closeScanPopup()
+ uni.showLoading({
+ title: '扫描中...',
+ mask: true
+ })
+ // var data =
+ // {
+ // code: "W19",
+ // partCode: "TMDLYA0AFM6A",
+ // partName: "P000000000000015",
+ // partDesc: "MY前保总成件售后件(冲孔)",
+ // basicUom: "PC",
+ // locationCode: "W",
+ // locationName: "原物料库位",
+ // stdPackQty: 100,
+ // remark: null,
+ // tenantId: null,
+ // extraProperties: {},
+ // concurrencyStamp: "b3f2cf7ba3e14166bb97dac768d91741",
+ // lastModificationTime: null,
+ // lastModifierId: null,
+ // creationTime: "2024-02-28T14:47:08.6878607",
+ // creatorId: null,
+ // qty:0,
+ // id: "4c40f72b-a86d-54be-aed2-3a1100a46436"
+ // }
+
+ getPositionCodeInfo(result.data.code).then(res=>{
+ uni.hideLoading()
+ if(res){
+ this.scanResult = res;
+ this.scanResult.qty =1;
+ this.callBack()
+ this.closeScanPopup()
+ }else {
+ this.showMessage("未查找到位置码【"+result.data.code+"】")
+ }
+ }).catch(error=>{
+ uni.hideLoading()
+ this.showMessage(error.message)
+ })
+
}
},
diff --git a/fe/PDA/pages/request/issueRequest.vue b/fe/PDA/pages/request/issueRequest.vue
index dc7c3c264..2272513a1 100644
--- a/fe/PDA/pages/request/issueRequest.vue
+++ b/fe/PDA/pages/request/issueRequest.vue
@@ -4,25 +4,26 @@
-
+
位置码 : {{dataContent.code}}
-
+
-
+
-
-
-
+
+
+
+
+
@@ -32,7 +33,7 @@
{{ item.partDesc }}
-
+
@@ -47,7 +48,7 @@
数量
-
+
@@ -125,7 +127,7 @@
data() {
return {
itemList: [],
- dataContent:{}
+ dataContent: {}
};
},
props: {
@@ -155,12 +157,13 @@
getScanResult(result) {
this.dataContent = result;
this.itemList.push(result)
+ this.$forceUpdate()
},
clear() {
- this.itemList=[];
- this.dataContent ={}
+ this.itemList = [];
+ this.dataContent = {}
},
@@ -171,54 +174,52 @@
return;
}
- // uni.showLoading({
- // title: "提交中....",
- // mask: true
- // });
+ uni.showLoading({
+ title: "提交中....",
+ mask: true
+ });
var params = this.setParams();
console.log(JSON.stringify(params))
- // issueRequest(params).then(res=>{
- // uni.hideLoading();
- // if (res) {
- // this.showCommitSuccess()
- // }else {
- // this.showMessage("提交失败");
- // }
- // }).catch(error=>{
- // uni.hideLoading();
- // this.showMessage(error.message);
- // })
+ issueRequest(params).then(res => {
+ uni.hideLoading();
+ this.showMessage("提交成功")
+ this.clear();
+ }).catch(error => {
+ uni.hideLoading();
+ this.showMessage(error.message);
+ })
},
- setParams(){
- var param ={
- worker:localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
- type:"Issue_Manual",
- details:[]
+ setParams() {
+ var param = {
+ worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
+ type: "Issue_Manual",
+ details: []
}
-
- this.itemList.forEach(res=>{
+
+ this.itemList.forEach(res => {
var data = {
- itemCode:res.partCode,
- itemName:res.partName,
- uom:res.basicUom,
- qty:res.qty,
- toLocationCode:res.locationCode,
- status:1
+ itemCode: res.partCode,
+ itemName: res.partName,
+ uom: res.basicUom,
+ qty: res.qty,
+ toLocationCode: res.locationCode,
+ positionCode: this.dataContent.code,
+ status: 1
}
param.details.push(data)
})
return param;
-
+
},
-
+
qtyChanged(value, item, index) {
if (value <= 0) {
this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
- return ;
- }
+ return;
+ }
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage('发料数量不能大于库存数量:' + item.handledQty)
diff --git a/fe/PDA/pages/task/receipt_detail.vue b/fe/PDA/pages/task/receipt_detail.vue
index 66cc496f7..cf6e67fa2 100644
--- a/fe/PDA/pages/task/receipt_detail.vue
+++ b/fe/PDA/pages/task/receipt_detail.vue
@@ -143,7 +143,8 @@
scanCount: 0,
isCheckAll: false,
selectedItem: {},
- loadingType: ""
+ loadingType: "",
+ jobContent:{}
};
},
onLoad(option) {
@@ -219,6 +220,7 @@
that.getJoDetail(callBack => {
that.ispending = that.receiptJob.jobStatus === 2;
if (that.receiptJob.details != null) {
+ that.jobContent =that.receiptJob;
that.allCount = that.receiptJob.details.length;
that.calcScanCount();
this.$nextTick();
@@ -325,7 +327,7 @@
that.$refs.receiptCheck.openReceiptCheckPopup(item.inspectPhotoJson);
},
unPacking(item) {
- this.$refs.comUnPacking.openPopup3(item,item.handledQty,item.recommendQty,false);
+ this.$refs.comUnPacking.openPopup3(this.jobContent,item,item.handledQty,item.recommendQty,false);
},
getUnPackingCount(qty){