Commit f0f9f313 authored by 沈翠玲's avatar 沈翠玲

Merge branch 'dev' of http://git.local.topsunit.com/mes/mes-pda into dev

parents 3ea7d446 a807ea0e
...@@ -82,6 +82,13 @@ ...@@ -82,6 +82,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/factoryTransfer/index",
"style": {
"navigationBarTitleText": "工厂间调拨",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/salesReturns/salesReturns", "path": "pages/salesReturns/salesReturns",
"style": { "style": {
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
<view class="page"> <view class="page">
<StickyNavBar> <StickyNavBar>
<NavBar title="完工入库扫描"></NavBar> <NavBar title="完工入库扫描"></NavBar>
<FactorySelect v-model="warehouseCode" /> <FactorySelect v-model="LGOBE" @change="actionSheetCallback" />
<view class="selectSheet"> <!-- <view class="selectSheet">
<u-row > <u-row >
<u-col span="12"> <u-col span="12">
<u-picker v-model="depotShow" mode="selector" :default-selector="[0]" range-key="text" :range="depotLists" @confirm="actionSheetCallback"></u-picker> <u-picker v-model="depotShow" mode="selector" :default-selector="[0]" range-key="text" :range="depotLists" @confirm="actionSheetCallback"></u-picker>
<u-input v-model="LGOBE" placeholder="请选择仓库别" :type="type" :border="border" @click="depotShow = true" /> <u-input v-model="LGOBE" placeholder="请选择仓库别" :type="type" :border="border" @click="depotShow = true" />
</u-col> </u-col>
</u-row> </u-row>
</view> </view> -->
<view class="btn"> <view class="btn">
<uni-easyinput prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫描库位" @change="handleInputNlpla"></uni-easyinput> <uni-easyinput prefixIcon="search" class="topSearch" v-model="nlpla" focus placeholder="请扫描库位" @change="handleInputNlpla"></uni-easyinput>
<uni-easyinput <uni-easyinput
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
}; };
}, },
created() { created() {
this.getDepotLists(); // this.getDepotLists();
// 二维码包含:10位物料号(右对齐不足补充为0)物料号12位生产单号(右对齐不足补充为0), // 二维码包含:10位物料号(右对齐不足补充为0)物料号12位生产单号(右对齐不足补充为0),
// 10位批次号(右对齐不足补充为0),8位数量(100000.0)(右对齐不足补充为0) // 10位批次号(右对齐不足补充为0),8位数量(100000.0)(右对齐不足补充为0)
// this.getPlnr('006000000100100000000300000501001'); // this.getPlnr('006000000100100000000300000501001');
...@@ -127,10 +127,8 @@ export default { ...@@ -127,10 +127,8 @@ export default {
}); });
}, },
// 点击actionSheet回调 // 点击actionSheet回调
actionSheetCallback(index) { actionSheetCallback(item) {
console.log(index, 'index'); this.LGORT = item?.LGORT || "";
this.LGOBE = this.depotLists[index].LGOBE;
this.LGORT = this.depotLists[index].LGORT;
}, },
deleGonds(idx) { deleGonds(idx) {
this.goodsList.splice(idx, 1); this.goodsList.splice(idx, 1);
......
<template>
<view>
<StickyNavBar>
<NavBar title="工厂间调拨"></NavBar>
<view class="btn">
<uni-easyinput
prefixIcon="search"
:disabled="isDisabled"
v-model="wxparams"
:focus="isFocus"
placeholder="请扫描单号"
@input="handleInputPlnr"
></uni-easyinput>
</view>
</StickyNavBar>
<view class="cardBox">
<text class="cardBoxTip">
步骤一 扫描单号
</text>
<u-image class='cardBoxImg' :src="bgSrc" width="560rpx" height="400rpx"></u-image>
<view class="cardBoxTip2">
摄像头对准
</view>
<view class="cardBoxTip3">
生产发料单号二维码
</view>
<view class="cardBoxTip2">
<text class="tipLeft">
点击扫描或
</text>
<text class="tipRight">
点选单号
</text>
</view>
</view>
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle"></BottomBtn>
</view>
</template>
<script>
import StickyNavBar from '@/components/StickyNavBar/index.vue';
import ContentLoadingMore from '@/components/ContentLoadingMore/index.vue';
import BottomBtn from '@/components/BottomBtn/index.vue';
export default {
components: {
StickyNavBar,
ContentLoadingMore,
BottomBtn
},
data() {
return {
bgSrc: require('@/static/images/qrcode.png'),
number: 0,
totalNum: 0,
show: true,
nlpla: '',
wxparams: '',
btnArr: [
{
style: '',
type: 'primary',
text: '扫描单号',
way: 'scanning'
},
{
style: '',
type: 'warning',
text: '查询单号',
way: 'goClick'
}
],
goodsList: [],
isFocus: false,
isDisabled: false
};
},
created() {
// this.getPlnr('SN202400172');
},
methods: {
getBtnHandle(row) {
this[row.way]();
},
goClick() {
// uni.navigateTo({
// url: `/pages/productionIssuance/oddNumList`
// });
},
scanning() {
// uni.navigateTo({
// url: `/pages/productionIssuance/productionIssuanceList?order=${JSON.stringify(this.goodsList)}`
// });
},
handleInputPlnr(e) {
this.isFocus = false;
e && this.getPlnr(e);
},
getPlnr(applyNo) {
this.totalNum = 0;
this.isDisabled = true;
}
}
};
</script>
<style lang="scss" scoped>
page {
background: #f8f8f8;
}
.btn {
padding: 20rpx;
background: #fff;
.topSearch {
margin-bottom: 20rpx;
}
}
.cardBox {
min-height: calc(100vh - 400rpx);
padding: 0rpx 20rpx;
margin-top: 20rpx;
}
/deep/ .u-sticky {
top: 0 !important;
background: #fff;
}
.cardBoxTip{
color: #000;
font-size: 28rpx;
}
.cardBoxTip2{
color: #000;
font-size: 28rpx;
text-align: center;
}
.cardBoxTip3{
color: #3f9dcc;
font-size: 28rpx;
text-align: center;
}
.tipRight{
color: #ff9900;
}
</style>
\ No newline at end of file
...@@ -120,6 +120,11 @@ ...@@ -120,6 +120,11 @@
text: '发货下架', text: '发货下架',
url: '/pages/sendOutGoodsOff/index' url: '/pages/sendOutGoodsOff/index'
}, },
{
src: require('@/static/images/xsck.png'),
text: '工厂间调拨',
url: '/pages/factoryTransfer/index'
},
] ]
}] }]
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<relationships v-show="current === 0" :list="goodsList" @deleGonds="deleGonds" /> <relationships v-show="current === 0" :list="goodsList" @deleGonds="deleGonds" />
<metering v-show="current === 1" :form="form" /> <metering v-show="current === 1" :form="form" />
<unpacking v-show="current === 2" /> <unpacking v-show="current === 2" />
<BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current === 0"></BottomBtn> <BottomBtn :btnArr="btnArr" @getBtnHandle="getBtnHandle" v-if="current !== 2"></BottomBtn>
</view> </view>
</template> </template>
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
this.$u.toast('暂无提交数据'); this.$u.toast('暂无提交数据');
return return
} }
if (!this.blNum) { if (!this.blNum && this.form.ZZXFS === 'BL+PL') {
this.$u.toast('请扫描箱码'); this.$u.toast('请扫描箱码');
return return
} }
...@@ -171,9 +171,7 @@ ...@@ -171,9 +171,7 @@
} }
if (res.every((item) => item.TYPE === 'S')) { if (res.every((item) => item.TYPE === 'S')) {
this.$u.toast(res[0].MESSAGE); this.$u.toast(res[0].MESSAGE);
setTimeout(() => { this.resetData()
this.goBack()
}, 1000)
} }
const foundObject = res.find(item => item.TYPE === 'E'); const foundObject = res.find(item => item.TYPE === 'E');
if (foundObject && foundObject.MESSAGE) { if (foundObject && foundObject.MESSAGE) {
...@@ -181,6 +179,11 @@ ...@@ -181,6 +179,11 @@
} }
}); });
}, },
// 重置数据
resetData() {
this.goodsList = [];
this.form.brgew = ''
},
// 删除 // 删除
deleGonds(idx) { deleGonds(idx) {
this.goodsList.splice(idx, 1); this.goodsList.splice(idx, 1);
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<StickyNavBar> <StickyNavBar>
<NavBar title="发货下架"></NavBar> <NavBar title="发货下架"></NavBar>
<view class="btn"> <view class="btn">
<uni-easyinput class="boxSelect" prefixIcon="search" v-model="lgort" placeholder="请扫描目标仓位"></uni-easyinput>
<uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model="wxparams" :focus="isFocus" <uni-easyinput prefixIcon="search" :disabled="isDisabled" v-model="wxparams" :focus="isFocus"
placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput> placeholder="请扫描产品包装条码/外箱码" @input="handleInputPlnr"></uni-easyinput>
</view> </view>
...@@ -28,7 +29,9 @@ ...@@ -28,7 +29,9 @@
<script> <script>
import BottomBtn from '@/components/BottomBtn/index.vue'; import BottomBtn from '@/components/BottomBtn/index.vue';
import StickyNavBar from '@/components/StickyNavBar/index.vue'; import StickyNavBar from '@/components/StickyNavBar/index.vue';
import { parseTime} from "@/utils/ruoyi"; import {
parseTime
} from "@/utils/ruoyi";
export default { export default {
components: { components: {
...@@ -38,6 +41,7 @@ ...@@ -38,6 +41,7 @@
data() { data() {
return { return {
wxparams: "", wxparams: "",
lgort: '',
isDisabled: false, isDisabled: false,
isFocus: false, isFocus: false,
goodsList: [], goodsList: [],
...@@ -94,6 +98,9 @@ ...@@ -94,6 +98,9 @@
this.wxparams = '' this.wxparams = ''
}, 1000); }, 1000);
}, },
goBack() {
uni.navigateBack()
},
getBtnHandle(row) { getBtnHandle(row) {
console.log('getBtnHandle', row); console.log('getBtnHandle', row);
this[row.way](); this[row.way]();
...@@ -103,10 +110,13 @@ ...@@ -103,10 +110,13 @@
if (!this.goodsList.length) { if (!this.goodsList.length) {
return this.$u.toast('请扫描需要下架的箱条码/外箱码') return this.$u.toast('请扫描需要下架的箱条码/外箱码')
} }
const DATUM = parseTime(new Date(),'{y}{m}{d}'), if (!this.lgort) {
UNAME = this.vuex_user.nickName, return this.$u.toast('请选择目标仓位')
UZEIT = parseTime(new Date(),'{h}{i}{s}'); }
const arr = this.goodsList const arr = this.goodsList.map((item) => {
item.LGORT = this.lgort
return item
})
this.$u.api.sapApi this.$u.api.sapApi
.sapCasePlnr2(arr) .sapCasePlnr2(arr)
.then((res) => { .then((res) => {
...@@ -132,6 +142,7 @@ ...@@ -132,6 +142,7 @@
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
} }
page { page {
background: #f8f8f8; background: #f8f8f8;
} }
...@@ -149,6 +160,7 @@ ...@@ -149,6 +160,7 @@
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
} }
.cardContent { .cardContent {
border-radius: 8px; border-radius: 8px;
background: #fff; background: #fff;
...@@ -177,5 +189,4 @@ ...@@ -177,5 +189,4 @@
font-weight: 600; font-weight: 600;
} }
} }
</style> </style>
import deepMerge from "../function/deepMerge"; import deepMerge from "../function/deepMerge";
import validate from "../function/test"; import validate from "../function/test";
import store from '@/store/index.js'
class Request { class Request {
// 设置全局默认配置 // 设置全局默认配置
setConfig(customConfig) { setConfig(customConfig) {
...@@ -75,22 +76,33 @@ class Request { ...@@ -75,22 +76,33 @@ class Request {
} }
} }
// 处理sap接口 // 处理sap接口
let url= this.config.baseUrl let url = this.config.baseUrl
if(options.url.indexOf('sap') > -1){ if (options.url.indexOf('sap') > -1) {
// console.log('sap') // #ifdef APP-PLUS
url = 'http://192.168.3.109:8000' url = 'http://192.168.3.109:8000'
// #endif
options.header = { options.header = {
...options.header, ...options.header,
'content-type': 'application/json;charset=UTF-8', 'content-type': 'application/json;charset=UTF-8',
'Authorization':'Basic cmVzdF91c2VyOkJzbjEyMzQ1Ng==', 'Authorization': 'Basic cmVzdF91c2VyOkJzbjEyMzQ1Ng==',
}
// 设置公共参数
if (Object.prototype.toString.call(options.data) != '[object Array]') {
options.data = {
...options.data,
werks: store.state.vuex_user_factory
} }
}else if(options.url.indexOf('apiPda') > -1){ }
} else if (options.url.indexOf('apiPda') > -1) {
options.header = { options.header = {
...options.header, ...options.header,
'content-type': 'application/json;charset=UTF-8', 'content-type': 'application/json;charset=UTF-8',
} }
url = 'http://192.168.3.91:8100' url = 'http://192.168.3.91:8100'
}else{ } else {
// console.log('mobile') // console.log('mobile')
url = 'http://192.168.3.91:8100' url = 'http://192.168.3.91:8100'
} }
...@@ -110,7 +122,7 @@ class Request { ...@@ -110,7 +122,7 @@ class Request {
this.config.timer = null; this.config.timer = null;
}, this.config.loadingTime); }, this.config.loadingTime);
} }
console.log('请求参数',options) console.log('请求参数', options)
uni.request(options); uni.request(options);
}) })
// .catch(res => { // .catch(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment