Browse Source

人工叫料申请

pda_nev
李俊城 1 year ago
parent
commit
94c5be44aa
  1. 10
      fe/PDA/api/index.js
  2. 3
      fe/PDA/common/new_style.css
  3. 2
      fe/PDA/common/pdabasic.css
  4. 190
      fe/PDA/mycomponents/coms/comUnPacking.vue
  5. 164
      fe/PDA/mycomponents/wincom/winScanByPosition.vue
  6. 7
      fe/PDA/pages.js
  7. 9
      fe/PDA/pages.json
  8. 2
      fe/PDA/pages/login/index.vue
  9. 264
      fe/PDA/pages/request/issueRequest.vue
  10. 1
      fe/PDA/pages/task/issue_detail.vue
  11. 21
      fe/PDA/pages/task/receipt_detail.vue
  12. 2
      fe/PDA/static/config.json

10
fe/PDA/api/index.js

@ -580,7 +580,7 @@ export const checkjobbypacking = (params) => request(
})
//创建叫料申请
export const materialrequest = (params) => request(
export const issueRequest = (params) => request(
devUrl + "/api/pda/store/material-request", { //
data: params,
method: "post"
@ -1193,6 +1193,14 @@ export const returnBeforePutaway = (params) => request(
// method: "get"
// });
//获取位置码信息
//查询器具是否存在
export const getPositionCodeInfo = (code) => request(
devUrl + "/api/pda/position-code/" + code, { //
data: {},
method: "get"
});
//获取产品标签信息inventorylabel
export const getInventoryLabel = (code) => request(

3
fe/PDA/common/new_style.css

@ -257,6 +257,9 @@ uni-page-head .uni-page-head__title {
font-size: 0.875rem;
padding: 8rpx 10rpx;
border-radius: 8rpx;
display: flex;
align-items: center;
}
.photo_btn text {

2
fe/PDA/common/pdabasic.css

@ -229,7 +229,7 @@
.uni-popup-view {
background-color: #fff;
border-radius: 10px;
border-radius: 15rpx;
}
.uni-popup-button-box {

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

@ -0,0 +1,190 @@
<template>
<view>
<uni-popup ref="popupqtyedit" type="center">
<view class="uni-popup-view" style="display: flex;flex-direction: column; width: 500rpx;">
<view
style="display: flex; justify-content: center; align-items: center; padding: 10rpx;flex-direction: column;">
<view style="padding: 10rpx; font-weight: bold; font-size: 35rpx;">{{title}}</view>
<view class="" style="width: 100%; background-color: black;height: 1rpx;">
</view>
</view>
<view style="padding: 6rpx;margin-left: 15rpx;">箱码 : {{dataContent.recommendPackingCode}}</view>
<view style="padding: 6rpx;margin-left: 15rpx;">物料号 : {{dataContent.itemCode}}</view>
<view style="padding: 6rpx;margin-left: 15rpx;">名称 : {{dataContent.itemName}}</view>
<view style="padding: 6rpx;margin-left: 15rpx;">描述 : {{dataContent.itemDesc1}}</view>
<view style="display: flex; justify-content: center;align-items: center; padding: 6rpx;">
<com-number-box v-model="value" :max="99999999" :min="0" style='margin: 0px 5px' />
<view class="">
({{dataContent.uom}})
</view>
</view>
<view class="uni-popup-button-box">
<button @click="submit" class="save-button" style="width: 220rpx;margin-top: 10rpx; " type="primary">确定</button>
</view>
</view>
<comMessage ref="comMessage"></comMessage>
</uni-popup>
</view>
</template>
<script>
import {
showErrorMsg,
} from '@/common/basic.js';
import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue'
export default {
components: {
comMessage,
comNumberBox
},
props: {
title: {
type: String,
default: ""
}
},
data() {
return {
value: 0,
defaultValue: 0,
vaildMaxValue: {
type: Boolean,
default: true
},
//0
allowZero: {
type: Boolean,
default: true
},
dataContent: {},
}
},
created() {
},
methods: {
openPopup(qty) {
this.value = qty;
this.defaultValue = qty;
this.$refs['popupqtyedit'].open("center");
},
//vaild,
openPopup1(qty, vaild) {
this.value = qty;
this.defaultValue = qty;
this.vaildMaxValue = vaild;
this.$refs['popupqtyedit'].open("center");
},
//vaildqty,
openPopup2(qty, vaildqty) {
this.value = qty;
this.defaultValue = vaildqty;
this.vaildMaxValue = true;
this.$refs['popupqtyedit'].open("center");
},
//qtyvaildqty , isZero0
openPopup3(item, qty, vaildqty, isZero) {
this.dataContent = item
this.value = qty;
this.defaultValue = vaildqty;
this.vaildMaxValue = true;
this.allowZero = isZero;
this.$refs['popupqtyedit'].open("center");
},
//qty0
openPopup4(qty, vaildMaxValue, isZero) {
this.value = qty;
this.defaultValue = qty;
this.vaildMaxValue = vaildMaxValue;
this.allowZero = isZero;
this.$refs['popupqtyedit'].open("center");
},
//
submit() {
let that = this;
if (that.value === "") {
this.showMessage('数量不能为空');
that.value = that.defaultValue;
} else {
let qty = Number(that.value);
if (that.vaildMaxValue) {
if (qty > that.defaultValue) {
this.showMessage('数量不能大于' + that.defaultValue);
that.value = that.defaultValue;
} else {
if (!that.allowZero) //0
{
if (qty == 0) {
this.showMessage('数量不能为0');
that.value = that.value;
} else if (qty < 0) {
this.showMessage('数量不能小于0');
that.value = that.value;
} else {
that.$emit("getvalue", qty);
that.$refs['popupqtyedit'].close();
}
} else {
that.$emit("getvalue", qty);
that.$refs['popupqtyedit'].close();
}
}
} else {
if (!that.allowZero) //0
{
if (qty == 0) {
this.showMessage('数量不能为0');
that.value = that.defaultValue;
} else if (qty < 0) {
this.showMessage('数量不能小于0');
that.value = that.defaultValue;
} else {
that.$emit("getvalue", qty);
that.$refs['popupqtyedit'].close();
}
} else {
that.$emit("getvalue", qty);
that.$refs['popupqtyedit'].close();
}
}
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
}
}
}
</script>
<!-- background-color: #fff; -->
<style scoped lang="scss">
.center {
flex: auto;
display: flex;
flex-direction: column;
justify-content: center;
// align-items: center;
}
.flex-item {
width: 50%;
text-align: center;
}
.messageButton {
border-color: #F8F8F8;
}
.messagePopup {
background-color: #fff;
border-radius: 5px;
}
/deep/ .uni-input-input {
font-size: 20px;
height: 46px;
}
</style>

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

@ -0,0 +1,164 @@
<template>
<view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()">
<view class="popup_box">
<view class="pop_title">
扫描位置码
<text class="fr" @click="closeScanPopup()">关闭</text>
</view>
<view class="pop_tab">
<view class="tab_info">
<win-com-scan ref="comscan" @getScanResult="getScanResult" placeholder="位置码"
:clearResult="true"></win-com-scan>
<view class="uni-flex">
<button class="clean_scan_btn" @click="cancelClick()">清空</button>
<button class="scan_btn" @click="scanClick()">扫描</button>
</view>
</view>
</view>
</view>
</uni-popup>
<com-message ref="comMessage" @afterClose="getfocus"></com-message>
</view>
</template>
<script>
import winComScan from '@/mycomponents/wincom/winComScan.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import {
getPositionCodeInfo
} from '@/api/index.js';
export default {
name: 'winScanByPack',
components: {
winComScan,
comMessage
},
props: {
title: {
type: String,
default: ''
},
},
data() {
return {
scanResult: {},
show: false,
}
},
created() {
},
methods: {
openScanPopup(content) {
this.$refs.popup.open('bottom');
},
closeScanPopup(content) {
this.$refs.popup.close();
this.$emit("close", '');
},
scanClick() {
this.$refs.comscan.handelScanMsg();
},
cancelClick() {
this.$refs.comscan.clearScanValue();
},
getScanResult(result) {
console.log("扫描",result.data.code)
if (result != null) {
if(result.data.code[0].toUpperCase()!="W"){
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()
}
},
getLabelResult(label) {
let labelResult = {
sucess: true,
message: "",
data: label,
// data: {
// isPack: true,
// // scanType: null,
// itemCode: label.itemCode,
// itemName: label.itemName,
// itemDesc1: label.itemDesc1,
// itemDesc2: label.itemDesc2,
// lot: label.lot,
// qty: label.qty,
// uom: label.uom,
// poNumber: label.poNumber,
// // asn: null,
// packingCode: label.code,
// supplierBatch: label.supplierBatch,
// // order: null,
// // poLine: null,
// code: label.code,
// }
};
labelResult.data.isPack = true;
labelResult.data.packingCode = label.code;
return labelResult;
},
callBack() {
this.$refs.comscan.clear();
this.$emit("getScanResult", this.scanResult);
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
change(e) {
this.show = e.show
}
}
}
</script>
<style>
</style>

7
fe/PDA/pages.js

@ -271,6 +271,13 @@ module.exports = () => ({
"enablePullDownRefresh": true
}
},
{
"path": "pages/request/issueRequest",
"style": {
"navigationBarTitleText": "人工叫料申请",
"enablePullDownRefresh": true
}
},
// {
// "path": "pages/instruments/index",
// "style": {

9
fe/PDA/pages.json

@ -284,6 +284,14 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/request/issueRequest",
"style": {
"navigationBarTitleText": "人工叫料申请",
"enablePullDownRefresh": true
}
},
// {
// "path": "pages/instruments/index",
// "style": {
@ -335,6 +343,7 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/task/issueByFIFO",
"style": {

2
fe/PDA/pages/login/index.vue

@ -58,7 +58,7 @@
</form>
</view>
</view>
version : {{version}}
<!-- version : {{version}} -->
</view>
</template>

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

@ -0,0 +1,264 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<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_card">
<view class="device-detail">
<view class="list-style nopad">
<view class="ljh_box nopad">
<view class="tit_ljh uni-flex">
<text class="font_xl text_black text_bold">位置码 : {{dataContent.code}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<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">
<view class="tit_ljh">{{ item.partCode }}</view>
<view class="ljh_left desc_ljh">
<view class="font_xs text_lightblue">{{ item.partName }}</view>
<view class="font_xs text_lightblue">{{ item.partDesc }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">
<uni-tr>
<uni-th width="50">库位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.locationCode }}({{item.locationName}})
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">数量</text></uni-th>
<uni-th width="240" align="center">
<view
style="display: flex;flex-direction: row;justify-content:center;align-items: center;">
<com-number-box :ref="'comNumberBox_'+index" v-model="item.qty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event,item,index)">
</com-number-box>
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">单位</uni-th>
<uni-th width="240" align="center">
<view class="text_packingCode">
{{ item.basicUom }}
</view>
</uni-th>
</uni-tr>
<uni-tr>
<uni-th width="50">标包数</uni-th>
<uni-th width="240" align="center">
<view class="text_black">{{item.stdPackQty }}</view>
</uni-th>
</uni-tr>
</uni-table>
</view>
</view>
</view>
<view class="choose_marked" v-if="item.scaned">
<image src="@/static/image_marked.svg"></image>
</view>
</view>
</view>
</scroll-view>
<div class="new_bot_box" v-show="itemList.length>0">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_clear_btn btn_double" @click="clear()">清空</button>
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<!-- <win-scan-button @goScan='openScanPopup' v-if="itemList.length>0"></win-scan-button> -->
<winScanByPosition ref="scanPopup" @getScanResult='getScanResult'></winScanByPosition>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
issueRequest
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption
} from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import winScanButton from '@/mycomponents/wincom/winScanButton.vue'
import winScanByPosition from '@/mycomponents/wincom/winScanByPosition.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
export default {
name: 'purchasePutaway',
components: {
winBlankView,
comMessage,
winScanButton,
winScanByPosition,
comNumberBox
},
data() {
return {
itemList: [],
dataContent:{}
};
},
props: {
// locationTypes: {
// type: [Array, String, Number],
// value: ''
// },
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index === 1) {
window.location.reload();
}
},
mounted: function() {
this.options = getRemoveOption();
this.openScanPopup();
},
methods: {
openScanPopup() {
this.$refs.scanPopup.openScanPopup()
},
getScanResult(result) {
this.dataContent = result;
this.itemList.push(result)
},
clear() {
this.itemList=[];
this.dataContent ={}
},
submit() {
let that = this;
if (that.itemList.length === 0) {
that.showMessage('请扫描位置码');
return;
}
// 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);
// })
},
setParams(){
var param ={
worker:localStorage.userName_CN ==""?localStorage.userName:localStorage.userName_CN,
type:"Issue_Manual",
details:[]
}
this.itemList.forEach(res=>{
var data = {
itemCode:res.partCode,
itemName:res.partName,
uom:res.basicUom,
qty:res.qty,
toLocationCode:res.locationCode,
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 ;
}
// else if (value > item.defaultHandleQty) {
// item.handledQty = item.defaultHandleQty
// this.showMessage(':' + item.handledQty)
// this.$refs['comNumberBox_' + index][0].setValue(item.handledQty);
// }
},
showMessage(message) {
this.$refs.comMessage.showMessage(message);
},
showConfirmMessage(message) {
this.$refs.comMessage.showConfirmMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
closeScanMessage() {
this.scanPopupGetFocus();
},
closeCommitMessage() {
// this.openScanPopup();
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus(message) {
this.$refs.scanPopup.losefocus();
},
}
};
</script>
<style scoped lang="scss">
</style>

1
fe/PDA/pages/task/issue_detail.vue

@ -19,6 +19,7 @@
<view class="font_xs text_lightblue">{{ item.itemDesc1 }}</view>
</view>
</view>
<view class="list_form">
<view class="uni-container">
<uni-table style="overflow-x: hidden;">

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

@ -48,7 +48,11 @@
<view class="photo_btn fr" style="margin:0 20rpx 20rpx; "
v-if="item.purchaseReceiptInspectStatus>1" @click="takePhoto(item)">
<image class="icon_normal fl" src="@/static/icons_ui/icon_take_photo.svg"></image>
<text class="fl">拍照</text>
<text class="fl" style="text-align: center;" >拍照</text>
</view>
<view v-if="item.purchaseReceiptInspectStatus>1" class="photo_btn fr" style="margin:0 20rpx 20rpx; font-size:38rpx;"
@click="unPacking(item)">
拆箱
</view>
</view>
<view v-if="item.purchaseReceiptInspectStatus>1"
@ -75,6 +79,9 @@
<receipt-check ref='receiptCheck' :dataContent='selectedItem' :disabled='false'
@getReceiptResult='getPhotoResult'>
</receipt-check>
<comUnPacking ref='comUnPacking'
@getvalue="getUnPackingCount" title="拆箱">
</comUnPacking>
<com-message ref="comMessage" @afterCloseCommitMessage='closeCommitMessage()' @afterCloseScanMessage='closeScanMessage'></com-message>
</view>
</template>
@ -103,6 +110,7 @@
import winScanByPack from '@/mycomponents/wincom/winScanByPack.vue'
import receiptCheck from '@/pages/task/receipt_check.vue'
import comJobScanDetail from '@/mycomponents/comjob/comJobScanDetail.vue'
import comUnPacking from '@/mycomponents/coms/comUnPacking.vue'
export default {
name: 'receipt_detail',
@ -111,7 +119,8 @@
winScanButton,
winScanByPack,
receiptCheck,
comJobScanDetail
comJobScanDetail,
comUnPacking
},
data() {
return {
@ -312,6 +321,14 @@
that.selectedItem = item;
that.$refs.receiptCheck.openReceiptCheckPopup(item.inspectPhotoJson);
},
unPacking(item) {
this.$refs.comUnPacking.openPopup3(item,item.handledQty,item.recommendQty,false);
},
getUnPackingCount(qty){
console.log(qty)
},
getPhotoResult(files) {
this.afterPurchase();

2
fe/PDA/static/config.json

@ -29,7 +29,7 @@
"print_url": "http://dev.ccwin-in.com:59095",
"version_update_url": "http://dev.ccwin-in.com:60071",
"isScrapScanToLocation": false,
"isReceiptToday": true,
"isReceiptToday": false,
"scrapReason": "ScrapReason",
"purchaseReturnReason": "PurReturnReason",
"returnBeforPutawayReason": "UnqualifiedReason",

Loading…
Cancel
Save