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. 69
      fe/PDA/mycomponents/wincom/winScanByPosition.vue
  5. 89
      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: {}, data: {},
method: "get" 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( export const issueDirect = (params) => request(

2
fe/PDA/common/new_style.css

@ -1887,7 +1887,7 @@ uni-modal .uni-modal__hd {
color: #fff; color: #fff;
text-align: center; text-align: center;
width: 150rpx; width: 150rpx;
margin:0 20rpx 20rpx; margin:0 10rpx 10rpx;
} }
.btn_single_after { .btn_single_after {
opacity: 0.7; 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="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> <button @click="submit" class="save-button" style="width: 220rpx;margin-top: 10rpx;margin-left: 10rpx; " type="primary">确定</button>
</view> </view>
</view> </view>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -34,6 +33,11 @@
import { import {
showErrorMsg, showErrorMsg,
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
generateNewPacking,
unPacking,
getInventoryLabel
} from '@/api/index.js';
import comMessage from '@/mycomponents/common/comMessage.vue' import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue' import comNumberBox from '@/mycomponents/common/comNumberBox.vue'
export default { export default {
@ -61,6 +65,7 @@
default: true default: true
}, },
dataContent: {}, dataContent: {},
jobContent:{}
} }
}, },
created() { created() {
@ -87,7 +92,8 @@
this.$refs['popupqtyedit'].open("center"); this.$refs['popupqtyedit'].open("center");
}, },
//qtyvaildqty , isZero0 //qtyvaildqty , isZero0
openPopup3(item, qty, vaildqty, isZero) { openPopup3(jobContent,item, qty, vaildqty, isZero) {
this.jobContent =jobContent
this.dataContent = item this.dataContent = item
this.value = qty; this.value = qty;
this.defaultValue = vaildqty; this.defaultValue = vaildqty;
@ -128,12 +134,10 @@
this.showMessage('数量不能小于0'); this.showMessage('数量不能小于0');
that.value = that.value; that.value = that.value;
} else { } else {
that.$emit("getvalue", qty); this.getDataInfo(qty)
that.$refs['popupqtyedit'].close();
} }
} else { } else {
that.$emit("getvalue", qty); this.getDataInfo(qty)
that.$refs['popupqtyedit'].close();
} }
} }
} else { } else {
@ -146,18 +150,156 @@
this.showMessage('数量不能小于0'); this.showMessage('数量不能小于0');
that.value = that.defaultValue; that.value = that.defaultValue;
} else { } else {
that.$emit("getvalue", qty); this.getDataInfo(qty)
that.$refs['popupqtyedit'].close();
} }
} else { } else {
that.$emit("getvalue", qty); this.getDataInfo(qty)
that.$refs['popupqtyedit'].close();
} }
} }
} }
}, },
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) { showMessage(message) {
this.$refs.comMessage.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;
} }
} }
} }

69
fe/PDA/mycomponents/wincom/winScanByPosition.vue

@ -74,34 +74,47 @@
this.showMessage("标签格式不正确") this.showMessage("标签格式不正确")
return; return;
} }
// uni.showLoading({ uni.showLoading({
// title: '...', title: '扫描中...',
// mask: true mask: true
// }) })
var data = // var data =
{ // {
code: "W19", // code: "W19",
partCode: "TMDLYA0AFM6A", // partCode: "TMDLYA0AFM6A",
partName: "P000000000000015", // partName: "P000000000000015",
partDesc: "MY前保总成件售后件(冲孔)", // partDesc: "MY",
basicUom: "PC", // basicUom: "PC",
locationCode: "W", // locationCode: "W",
locationName: "原物料库位", // locationName: "",
stdPackQty: 100, // stdPackQty: 100,
remark: null, // remark: null,
tenantId: null, // tenantId: null,
extraProperties: {}, // extraProperties: {},
concurrencyStamp: "b3f2cf7ba3e14166bb97dac768d91741", // concurrencyStamp: "b3f2cf7ba3e14166bb97dac768d91741",
lastModificationTime: null, // lastModificationTime: null,
lastModifierId: null, // lastModifierId: null,
creationTime: "2024-02-28T14:47:08.6878607", // creationTime: "2024-02-28T14:47:08.6878607",
creatorId: null, // creatorId: null,
qty:0, // qty:0,
id: "4c40f72b-a86d-54be-aed2-3a1100a46436" // id: "4c40f72b-a86d-54be-aed2-3a1100a46436"
} // }
this.scanResult = data;
this.callBack() getPositionCodeInfo(result.data.code).then(res=>{
this.closeScanPopup() 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)
})
} }
}, },

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

@ -4,25 +4,26 @@
<win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view> <win-blank-view @goScan='openScanPopup' v-if="itemList.length==0"></win-blank-view>
<view class="top_wrap" v-if="itemList.length>0"> <view class="top_wrap" v-if="itemList.length>0">
<view class="top_card"> <view class="top_card">
<view class="device-detail"> <view class="device-detail">
<view class="list-style nopad"> <view class="list-style nopad">
<view class="ljh_box nopad"> <view class="ljh_box nopad">
<view class="tit_ljh uni-flex"> <view class="tit_ljh uni-flex">
<text class="font_xl text_black text_bold">位置码 : {{dataContent.code}}</text> <text class="font_xl text_black text_bold">位置码 : {{dataContent.code}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<scroll-view scroll-y="true" <scroll-view scroll-y="true" @scroll="scroll" class="scroll-detail">
@scroll="scroll" class="scroll-detail">
<view class="detail-list margin_top" v-for="(item, index) in itemList" :key="item.id"> <view class="detail-list margin_top" v-for="(item, index) in itemList" :key="item.id">
<view class="detail-content"> <view class="detail-content">
<view class="choose_main"> <view class="choose_main">
<view class="ljh_box"> <view class="ljh_box">
@ -32,7 +33,7 @@
<view class="font_xs text_lightblue">{{ item.partDesc }}</view> <view class="font_xs text_lightblue">{{ item.partDesc }}</view>
</view> </view>
</view> </view>
<view class="list_form"> <view class="list_form">
<view class="uni-container"> <view class="uni-container">
<uni-table style="overflow-x: hidden;"> <uni-table style="overflow-x: hidden;">
@ -47,7 +48,7 @@
<uni-tr> <uni-tr>
<uni-th width="50">数量</text></uni-th> <uni-th width="50">数量</text></uni-th>
<uni-th width="240" align="center"> <uni-th width="240" align="center">
<view <view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;"> style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty" <com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="999999" :min="0" style='width: 100px;' :max="999999" :min="0" style='width: 100px;'
@ -71,6 +72,7 @@
</uni-th> </uni-th>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
</view> </view>
</view> </view>
</view> </view>
@ -125,7 +127,7 @@
data() { data() {
return { return {
itemList: [], itemList: [],
dataContent:{} dataContent: {}
}; };
}, },
props: { props: {
@ -155,12 +157,13 @@
getScanResult(result) { getScanResult(result) {
this.dataContent = result; this.dataContent = result;
this.itemList.push(result) this.itemList.push(result)
this.$forceUpdate()
}, },
clear() { clear() {
this.itemList=[]; this.itemList = [];
this.dataContent ={} this.dataContent = {}
}, },
@ -171,54 +174,52 @@
return; return;
} }
// uni.showLoading({ uni.showLoading({
// title: "....", title: "提交中....",
// mask: true mask: true
// }); });
var params = this.setParams(); var params = this.setParams();
console.log(JSON.stringify(params)) console.log(JSON.stringify(params))
// issueRequest(params).then(res=>{ issueRequest(params).then(res => {
// uni.hideLoading(); uni.hideLoading();
// if (res) { this.showMessage("提交成功")
// this.showCommitSuccess() this.clear();
// }else { }).catch(error => {
// this.showMessage(""); uni.hideLoading();
// } this.showMessage(error.message);
// }).catch(error=>{ })
// uni.hideLoading();
// this.showMessage(error.message);
// })
}, },
setParams(){ setParams() {
var param ={ var param = {
worker:localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN, worker: localStorage.userName_CN == "" ? localStorage.userName : localStorage.userName_CN,
type:"Issue_Manual", type: "Issue_Manual",
details:[] details: []
} }
this.itemList.forEach(res=>{ this.itemList.forEach(res => {
var data = { var data = {
itemCode:res.partCode, itemCode: res.partCode,
itemName:res.partName, itemName: res.partName,
uom:res.basicUom, uom: res.basicUom,
qty:res.qty, qty: res.qty,
toLocationCode:res.locationCode, toLocationCode: res.locationCode,
status:1 positionCode: this.dataContent.code,
status: 1
} }
param.details.push(data) param.details.push(data)
}) })
return param; return param;
}, },
qtyChanged(value, item, index) { qtyChanged(value, item, index) {
if (value <= 0) { if (value <= 0) {
this.showMessage('发料数量不能小于或等于0') this.showMessage('发料数量不能小于或等于0')
item.handledQty = item.defaultHandleQty item.handledQty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.handledQty); this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
return ; return;
} }
// else if (value > item.defaultHandleQty) { // else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty // item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty) // this.showMessage(':' + item.handledQty)

6
fe/PDA/pages/task/receipt_detail.vue

@ -143,7 +143,8 @@
scanCount: 0, scanCount: 0,
isCheckAll: false, isCheckAll: false,
selectedItem: {}, selectedItem: {},
loadingType: "" loadingType: "",
jobContent:{}
}; };
}, },
onLoad(option) { onLoad(option) {
@ -219,6 +220,7 @@
that.getJoDetail(callBack => { that.getJoDetail(callBack => {
that.ispending = that.receiptJob.jobStatus === 2; that.ispending = that.receiptJob.jobStatus === 2;
if (that.receiptJob.details != null) { if (that.receiptJob.details != null) {
that.jobContent =that.receiptJob;
that.allCount = that.receiptJob.details.length; that.allCount = that.receiptJob.details.length;
that.calcScanCount(); that.calcScanCount();
this.$nextTick(); this.$nextTick();
@ -325,7 +327,7 @@
that.$refs.receiptCheck.openReceiptCheckPopup(item.inspectPhotoJson); that.$refs.receiptCheck.openReceiptCheckPopup(item.inspectPhotoJson);
}, },
unPacking(item) { 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){ getUnPackingCount(qty){

Loading…
Cancel
Save