Browse Source

人工叫料申请

pda_nev
李俊城 1 year ago
parent
commit
ceeb3ebfe2
  1. 13
      fe/PDA/api/index.js
  2. 2
      fe/PDA/common/new_style.css
  3. 162
      fe/PDA/mycomponents/coms/comUnPacking.vue
  4. 65
      fe/PDA/mycomponents/wincom/winScanByPosition.vue
  5. 67
      fe/PDA/pages/request/issueRequest.vue
  6. 6
      fe/PDA/pages/task/receipt_detail.vue

13
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(

2
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;

162
fe/PDA/mycomponents/coms/comUnPacking.vue

@ -22,7 +22,6 @@
<button @click="cancle" class="save-button" style="width: 220rpx;margin-top: 10rpx;margin-right: 10rpx; " type="default">取消</button>
<button @click="submit" class="save-button" style="width: 220rpx;margin-top: 10rpx;margin-left: 10rpx; " type="primary">确定</button>
</view>
</view>
<comMessage ref="comMessage"></comMessage>
@ -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");
},
//qtyvaildqty , isZero0
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;
}
}
}

65
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;
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)
})
}
},

67
fe/PDA/pages/request/issueRequest.vue

@ -19,10 +19,11 @@
</view>
</view>
<scroll-view scroll-y="true"
@scroll="scroll" class="scroll-detail">
<scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in itemList" :key="item.id">
<view class="detail-content">
<view class="choose_main">
<view class="ljh_box">
@ -71,6 +72,7 @@
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
@ -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,40 +174,38 @@
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)
})
@ -217,7 +218,7 @@
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

6
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){

Loading…
Cancel
Save