Browse Source

添加回库

agv
李俊城 5 months ago
parent
commit
1fd32c0baf
  1. 8
      fe/PDA/api/index.js
  2. 3
      fe/PDA/main.js
  3. 111
      fe/PDA/mycomponents/wincom/winScanContent.vue
  4. 7
      fe/PDA/pages.js
  5. 12
      fe/PDA/pages.json
  6. 191
      fe/PDA/pages/inventory/returnWareHouse.vue
  7. 3
      fe/PDA/static/config.json

8
fe/PDA/api/index.js

@ -4,6 +4,7 @@ import VUE from 'vue'
let printUrl = VUE.prototype.$print_url; //打印
let devUrl = VUE.prototype.$dev_url; //数据请求
let returnWareHouseUrl = VUE.prototype.$returnWareHouseUrl; //回库请求地址
console.log('this', VUE.prototype)
@ -2246,7 +2247,12 @@ export const getWorkStationByLocation = (locationCode) => request(
method: "post"
});
//获取位置码信息
export const returnWarhouseSubmit = (params) => request(
devUrl + returnWareHouseUrl, { //
data: params,
method: "post"
});

3
fe/PDA/main.js

@ -37,8 +37,9 @@ let startApp = function() {
Vue.prototype.$purchaseReturnReason = res[1].data.params.purchaseReturnReason; //采购退货原因字典项
Vue.prototype.$returnBeforPutawayReason = res[1].data.params.returnBeforPutawayReason; //上架前退货原因字典项
Vue.prototype.$receiptCheckReason = res[1].data.params.receiptCheckReason; //采购收货不合格原因字典项
Vue.prototype.$configList = res[1].data.configList;
Vue.prototype.$returnWareHouseUrl= res[1].data.params.returnWareHouseUrl; //采购收货不合格原因字典项
initData()
getApp().globalData.text = res[1].data.params.version_update_url;

111
fe/PDA/mycomponents/wincom/winScanContent.vue

@ -0,0 +1,111 @@
<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';
import {
getPositionCodeName
} from '@/common/basic.js';
export default {
name: 'winScanByPack',
components: {
winComScan,
comMessage
},
props: {
title: {
type: String,
default: ''
},
codeType: {
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)
this.scanResult =result.data.code
this.callBack()
this.closeScanPopup()
},
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

@ -1011,6 +1011,13 @@ module.exports = () => ({
"navigationBarTitleText": "备件叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventory/returnWareHouse",
"style": {
"navigationBarTitleText": "回库",
"enablePullDownRefresh": false
}
}

12
fe/PDA/pages.json

@ -1007,12 +1007,14 @@
"navigationBarTitleText": "备件叫料申请详情",
"enablePullDownRefresh": false
}
},
{
"path": "pages/inventory/returnWareHouse",
"style": {
"navigationBarTitleText": "回库",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {

191
fe/PDA/pages/inventory/returnWareHouse.vue

@ -0,0 +1,191 @@
<template>
<page-meta root-font-size="18px"></page-meta>
<view class="">
<win-blank-view @goScan='openScanPopup' v-if="!workStationCode"></win-blank-view>
<view class="top_wrap" v-if="workStationCode">
<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">工位码 : {{workStationCode}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="uni-flex" style="flex-direction: row; align-items: center;" v-if="workStationCode">
<view class="" style="font-size: 35rpx; font-weight: bold; margin: 20rpx;">
数量
</view>
<com-number-box ref="comNumberBox" v-model="qty"
:max="999999" :min="0" style='width: 100px;'
@change="qtyChanged($event)">
</com-number-box>
</view>
<div class="new_bot_box" v-show="workStationCode">
<view class="new_btn_bot bot_pos uni-flex">
<button class="new_save_btn btn_double" @click="submit()">提交</button>
</view>
</div>
<winScanContent ref="scanPopup" @getScanResult='getScanResult' ></winScanContent>
<com-message ref="comMessage" @afterCloseScanMessage='closeScanMessage' @afterRescanMessage='afterRescan'
@afterCloseCommitMessage='closeCommitMessage'>
</com-message>
</view>
</template>
<script>
import {
returnWarhouseSubmit,
} from '@/api/index.js';
import {
showConfirmMsg,
goHome,
getRemoveOption,
getISODateTime,
scanSuccessAudio,
scanFailedAudio
} from '@/common/basic.js';
import winBlankView from '@/mycomponents/wincom/winBlankView.vue'
import winScanContent from '@/mycomponents/wincom/winScanContent.vue'
import comMessage from '@/mycomponents/common/comMessage.vue'
import comNumberBox from '@/mycomponents/common/comNumberBox.vue';
export default {
name: 'purchasePutaway',
components: {
winBlankView,
comMessage,
winScanContent,
comNumberBox
},
data() {
return {
workStationCode:"",
qty:0
};
},
props: {
},
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.workStationCode = result;
this.$forceUpdate()
},
clear() {
this.workStationCode = ""
this.qty = ""
},
submit() {
let that = this;
if (!that.workStationCode) {
that.showMessage('请扫描工位码');
return;
}
if (that.qty<0) {
that.showMessage('数量不允许小于0');
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log(JSON.stringify(params))
returnWarhouseSubmit(params).then(res => {
uni.hideLoading();
this.showMessage("提交成功")
this.clear();
}).catch(error => {
uni.hideLoading();
this.showMessage(error.message);
})
},
setParams() {
var param ={
matCode:"",
endPosition:this.workStationCode,
returnQty:this.qty
}
return param;
},
qtyChanged(value, item, index) {
if (value <= 0) {
item.qty = item.defaultHandleQty
this.$refs['comNumberBox_' + index][0].setValue(item.qty);
this.showMessage('发料数量不能小于或等于0')
return;
}
},
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() {
},
scanPopupGetFocus() {
this.$refs.scanPopup.getfocus();
},
scanPopupLoseFocus(message) {
this.$refs.scanPopup.losefocus();
},
}
};
</script>
<style scoped lang="scss">
</style>

3
fe/PDA/static/config.json

@ -33,7 +33,8 @@
"scrapReason": "ScrapReason",
"purchaseReturnReason": "PurReturnReason",
"returnBeforPutawayReason": "UnqualifiedReason",
"receiptCheckReason": "UnqualifiedReason"
"receiptCheckReason": "UnqualifiedReason",
"returnWareHouseUrl": "/wms/api/RestJsonService/notifyOutTaskBack4FW"
},
"desc": {
"companyCode": "公司代码",

Loading…
Cancel
Save