From 3a770819f22efdc0ecb0ba57de0ac64f08421c55 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期四, 13 十一月 2025 16:54:20 +0800
Subject: [PATCH] 波次拣货功能优化
---
pages/outbound/wavePickItem.vue | 199 ++++------
pages/listing/itemSelect.vue | 14
pages/listing/matnrPalletising.vue | 248 +++++-------
pages.json | 6
pages/outbound/PickItemDetl.vue | 234 ++++++++++++
pages/check/checkOrder.vue | 123 +++---
checkOrder.vue | 283 ++++++++++++++
pages/check/checkOrderItem.vue | 3
common/request.js | 2
9 files changed, 786 insertions(+), 326 deletions(-)
diff --git a/checkOrder.vue b/checkOrder.vue
new file mode 100644
index 0000000..512783e
--- /dev/null
+++ b/checkOrder.vue
@@ -0,0 +1,283 @@
+<template>
+ <view class="has-foot">
+ <form >
+ <view class="cu-form-group " v-show="!isconfirm">
+ <view class="title">鐩樼偣鍗�</view>
+ <input placeholder="璇锋壂鎻忕洏鐐瑰崟鍙�" v-model="barcode" @input="search()" focus></input>
+ <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
+ </view>
+
+ </form>
+
+
+
+ <view class="cu-list det menu sm-border padding">
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-list det menu " @click="clickTaskItem(index)">
+
+
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ </view>
+ <view class="content2">
+ <text class="text-gray"><text class="text-black ">{{item.exceStatus$}}</text></text>
+ </view>
+ </view>
+
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鐩樼偣宸紓鍗�:<text class="text-black ">{{item.orderCode}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍒涘缓鏃堕棿:<text class="text-black ">{{item.createTime$}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">搴撳瓨鏁伴噺:<text class="text-black ">{{item.anfme}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-gray">鐩樼偣鏁伴噺:<text class="text-black ">{{item.checkQty}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鐩樼偣绫诲瀷:<text class="text-black ">{{item.checkType$}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <progress :percent="Math.trunc((item.checkQty/item.anfme)*100) " show-info stroke-width="3" />
+ </view>
+ </view>
+
+ </view>
+ </block>
+ </view>
+
+
+ <view class="text-blue text-right padding-lr" v-show="isconfirm">
+ 鏈鏀惰揣鎬绘暟閲�:{{allCount}}
+ </view>
+
+ <view class="cu-form-group " v-show="isconfirm">
+ <view class="title">鏀惰揣鍖�</view>
+ <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
+ @change="selChange"></uni-data-select>
+ </view>
+
+ <view class="cu-bar btn-group foot" v-show="!isconfirm">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" @click="next">涓嬩竴姝�</button>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ isClickItem:false,
+ clickItem:'',
+ QRbarcode:null,
+ barcode: '',
+ whAreaId: '',
+ list: [],
+ range: [],
+ isconfirm: false,
+ itemStyle: {
+ backgroundColor: '#42b983',
+ borderColor: '#42b983'
+ },
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ allCount() {
+ return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
+ }
+ },
+ mounted() {
+ this.search()
+ },
+ methods: {
+ clickTaskItem(index){
+ let that = this
+ uni.navigateTo({
+ url: "./checkOrderItem",
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ success: function(res) {
+ res.eventChannel.emit('checkItem', {
+ data: that.list[index]
+ })
+ }
+
+ });
+ },
+ typeChange(e){
+ this.typeSelect = e.value
+ this.search()
+ },
+ async search() {
+ this.list = []
+ // if(this.barcode === '' || this.barcode ===null){
+ // return ;
+ // }
+ const {
+ code,
+ data,
+ msg
+ } = await request('/getCheckList',{
+ code:this.barcode
+ }
+ )
+ if (code === 200) {
+ if (Object.keys(data).length === 0){
+ uni.showToast({
+ title: "鏈煡璇㈠埌娉㈡鏁版嵁",
+ icon: "none",
+ position: 'top'
+ })
+ }
+ this.list.push(...data)
+
+ }else if(code == 401){
+ setTimeout(() => {
+ uni.removeStorageSync('token');
+ uni.reLaunch({
+ url: "/pages/login/login"
+ });
+ }, 1000);
+ }else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
+
+ },
+ clearCode() {
+ this.barcode = ''
+ },
+ remove(index) {
+ this.list.splice(index, 1);
+ },
+ clear() {
+ this.list = []
+ this.barcode = ''
+ },
+ next() {
+ if (this.list.length) {
+ this.isconfirm = true
+ } else {
+ uni.showToast({
+ icon: "none",
+ title: '鏈�夌墿鏂欐爣绛�'
+ })
+ }
+ },
+ prev() {
+ this.isconfirm = false
+ },
+ selChange(val) {
+ uni.setStorageSync('whAreaId', val)
+ },
+ async confirm() {
+ const newArr = this.list.map(item => {
+ return {
+ ...item,
+ receiptQty: item.receiptQty === null ? 0 : +item.receiptQty
+ };
+ });
+ if (this.whAreaId === '') {
+ uni.showToast({
+ icon: "none",
+ title: '璇烽�夋嫨鏀惰揣鍖�'
+ })
+ } else {
+ const {
+ code,
+ data,
+ msg
+ } = await request('/orders/confirm', {
+ receipts: newArr,
+ whAreaId: this.whAreaId
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: '鏀惰揣鎴愬姛'
+ })
+ this.list = []
+ this.barcode = ''
+ this.isconfirm = false
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
+ }
+ },
+
+ DateChange(e, item) {
+ item.prodTime = e.detail.value
+ }
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
+ .content2 {
+ /* background-color: coral; */
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-end;
+ margin-right: 10px;
+ color: #0081ff;
+ }
+</style>
\ No newline at end of file
diff --git a/common/request.js b/common/request.js
index 7645f4e..d0bc13c 100644
--- a/common/request.js
+++ b/common/request.js
@@ -16,7 +16,7 @@
const token = uni.getStorageSync('token');
// const URL = 'http://47.76.147.249:8080/rsf-server/pda' + url;
// const URL = 'http://test.zoneyung.net:8080/rsf-server/pda' + url;
- const URL = 'http://192.168.51.35:8085/rsf-server/pda' + url;
+ const URL = 'http://127.0.0.1:8085/rsf-server/pda' + url;
uni.request({
url: URL,
data: postData,
diff --git a/pages.json b/pages.json
index 3dbe06f..fb3ff8d 100644
--- a/pages.json
+++ b/pages.json
@@ -47,6 +47,12 @@
"style": {
"navigationBarTitleText": "娉㈡鎷h揣"
}
+ },
+ {
+ "path": "pages/outbound/PickItemDetl",
+ "style": {
+ "navigationBarTitleText": "鎷h揣鏄庣粏"
+ }
},
{
"path": "pages/rece/standard",
diff --git a/pages/check/checkOrder.vue b/pages/check/checkOrder.vue
index 512783e..4793937 100644
--- a/pages/check/checkOrder.vue
+++ b/pages/check/checkOrder.vue
@@ -1,6 +1,6 @@
<template>
<view class="has-foot">
- <form >
+ <form>
<view class="cu-form-group " v-show="!isconfirm">
<view class="title">鐩樼偣鍗�</view>
<input placeholder="璇锋壂鎻忕洏鐐瑰崟鍙�" v-model="barcode" @input="search()" focus></input>
@@ -8,54 +8,53 @@
</view>
</form>
-
-
+
+
<view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list" :key="index">
- <view class="cu-list det menu " @click="clickTaskItem(index)">
-
-
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
- <view class="action">
- <view class="index">
- {{index+1}}
+ <block v-for="(item, index) in list" :key="index">
+ <view class="cu-list det menu " @click="clickTaskItem(index)">
+ <view class="cu-bar bg-white solid-bottom margin-top-sm">
+ <view class="action">
+ <view class="index">
+ {{index+1}}
+ </view>
+ </view>
+ <view class="content2">
+ <text class="text-gray"><text class="text-black ">{{item.exceStatus$}}</text></text>
</view>
</view>
- <view class="content2">
- <text class="text-gray"><text class="text-black ">{{item.exceStatus$}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鐩樼偣宸紓鍗�:<text class="text-black ">{{item.orderCode}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鍒涘缓鏃堕棿:<text class="text-black ">{{item.createTime$}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">搴撳瓨鏁伴噺:<text class="text-black ">{{item.anfme}}</text></text>
- </view>
- <view class="content">
- <text class="text-gray">鐩樼偣鏁伴噺:<text class="text-black ">{{item.checkQty}}</text></text>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鐩樼偣宸紓鍗�:<text class="text-black ">{{item.orderCode}}</text></text>
+ </view>
</view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鐩樼偣绫诲瀷:<text class="text-black ">{{item.checkType$}}</text></text>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍒涘缓鏃堕棿:<text class="text-black ">{{item.createTime$}}</text></text>
+ </view>
</view>
- </view>
- <view class="cu-item">
- <view class="content">
- <progress :percent="Math.trunc((item.checkQty/item.anfme)*100) " show-info stroke-width="3" />
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">搴撳瓨鏁伴噺:<text class="text-black ">{{item.anfme}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-gray">鐩樼偣鏁伴噺:<text class="text-black ">{{item.checkQty}}</text></text>
+ </view>
</view>
- </view>
-
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鐩樼偣绫诲瀷:<text class="text-black ">{{item.checkType$}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <progress :percent="Math.trunc((item.checkQty/item.anfme)*100) " show-info
+ stroke-width="3" />
+ </view>
+ </view>
+
</view>
</block>
</view>
@@ -92,17 +91,17 @@
export default {
data() {
return {
- isClickItem:false,
- clickItem:'',
- QRbarcode:null,
+ isClickItem: false,
+ clickItem: '',
+ QRbarcode: null,
barcode: '',
whAreaId: '',
list: [],
range: [],
- isconfirm: false,
+ isconfirm: false,
itemStyle: {
- backgroundColor: '#42b983',
- borderColor: '#42b983'
+ backgroundColor: '#42b983',
+ borderColor: '#42b983'
},
}
},
@@ -116,7 +115,7 @@
this.search()
},
methods: {
- clickTaskItem(index){
+ clickTaskItem(index) {
let that = this
uni.navigateTo({
url: "./checkOrderItem",
@@ -126,10 +125,10 @@
data: that.list[index]
})
}
-
- });
+
+ });
},
- typeChange(e){
+ typeChange(e) {
this.typeSelect = e.value
this.search()
},
@@ -142,12 +141,11 @@
code,
data,
msg
- } = await request('/getCheckList',{
- code:this.barcode
- }
- )
- if (code === 200) {
- if (Object.keys(data).length === 0){
+ } = await request('/getCheckList', {
+ code: this.barcode
+ })
+ if (code === 200) {
+ if (Object.keys(data).length === 0) {
uni.showToast({
title: "鏈煡璇㈠埌娉㈡鏁版嵁",
icon: "none",
@@ -155,15 +153,15 @@
})
}
this.list.push(...data)
-
- }else if(code == 401){
+
+ } else if (code == 401) {
setTimeout(() => {
uni.removeStorageSync('token');
uni.reLaunch({
url: "/pages/login/login"
});
}, 1000);
- }else {
+ } else {
uni.showToast({
title: msg,
icon: "none",
@@ -237,7 +235,7 @@
}
},
-
+
DateChange(e, item) {
item.prodTime = e.detail.value
}
@@ -270,7 +268,8 @@
min-height: 80upx;
align-items: center;
}
- .content2 {
+
+ .content2 {
/* background-color: coral; */
width: 100%;
display: flex;
diff --git a/pages/check/checkOrderItem.vue b/pages/check/checkOrderItem.vue
index 4ab66f6..2bf5632 100644
--- a/pages/check/checkOrderItem.vue
+++ b/pages/check/checkOrderItem.vue
@@ -206,12 +206,9 @@
onLoad() {
let that = this
const eventChannel = this.getOpenerEventChannel();
-
eventChannel.on('checkItem', function(data) {
that.check = data.data
-
})
-
},
methods: {
sureAdd(){
diff --git a/pages/listing/itemSelect.vue b/pages/listing/itemSelect.vue
index b1ec2ba..20e7d72 100644
--- a/pages/listing/itemSelect.vue
+++ b/pages/listing/itemSelect.vue
@@ -4,8 +4,6 @@
<view class="search-bar">
<uni-search-bar v-model="condition" placeholder=" 杈撳叆鎵规/缂栫爜/鍗曞彿" bgColor="#EEEEEE" @confirm="search()"/>
</view>
-
-
<view>
<view class="padding-lr margin-top-sm">
<block v-for="(item, index) in matList" :key="index">
@@ -33,13 +31,20 @@
<text class="text-grey ">{{item.asnCode}}</text>
</view>
</view>
-
<view class="cu-item">
<view class="content">
<text class="text-black">渚涘簲鍟嗘壒娆�:</text>
</view>
<view class="action">
<text class="text-grey ">{{item.splrBatch}}</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-black">鐜板搧绁ㄥ彿:</text>
+ </view>
+ <view class="action">
+ <text class="text-grey ">{{item.extendFields.crushNo}}</text>
</view>
</view>
<view class="cu-item">
@@ -127,6 +132,7 @@
matnrCode: this.condition,
asnCode: this.condition,
code: this.condition,
+ fieldsIndex: this.condition,
batch: this.condition
}
this.getDet(req);
@@ -134,6 +140,7 @@
back() {
for (var i = 0; i < this.matList.length; i++) {
if(this.matList[i].selected === true){
+ this.matList[i].receiptQty = this.matList[i].anfme - this.matList[i].workQty
this.selectedList.push(this.matList[i])
}
}
@@ -163,6 +170,7 @@
matnrCode: req.matnrCode,
asnCode: req.asnCode,
code: req.code,
+ fieldsIndex: req.fieldsIndex,
batch: req.batch
}, "post")
if (code === 200) {
diff --git a/pages/listing/matnrPalletising.vue b/pages/listing/matnrPalletising.vue
index 50618e4..24551eb 100644
--- a/pages/listing/matnrPalletising.vue
+++ b/pages/listing/matnrPalletising.vue
@@ -1,31 +1,32 @@
<template>
<view class="has-foot">
<view>
-
- <form>
- <view class="cu-form-group margin-top">
- <view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="container" focus></input>
- <text class='cuIcon-search text-blue' @click="getList"></text>
- </view>
- <view class="cu-form-group">
- <view class="title">鐗╂枡缂栫爜</view>
- <input placeholder="璇锋壂鎻忕墿鏂欑紪鐮�" v-model="matnrCode"></input>
- <text class='cuIcon-search text-blue' @click="search"></text>
+ <form>
+ <view class="cu-form-group margin-top">
+ <view class="title">瀹瑰櫒鍙�</view>
+ <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="container" focus></input>
+ <text class='cuIcon-search text-blue' @click="getList"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">鐗╂枡缂栫爜</view>
+ <input placeholder="璇锋壂鎻忕墿鏂欑紪鐮�" v-model="matnrCode"></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">绁ㄥ彿</view>
+ <input placeholder="璇锋壂鎻忕幇鍝佺エ鍙�" v-model="fieldsIndex"></input>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ <view class="cu-form-group">
+ <view class="title">ASN鍗曞彿</view>
+ <input placeholder="璇疯緭鍏SN鍗曞彿" v-model="asnCode"></input>
+ </view>
+ </form>
+ <view class="flex solid-bottom padding-sm justify-between">
+ <view class="text-blue">鐗╂枡鎬荤被锛歿{list.length}}</view>
+ <view class="text-blue">缁勭洏鎬绘暟锛歿{allCount}}</view>
</view>
- <view class="cu-form-group">
- <view class="title">ASN鍗曞彿</view>
- <input placeholder="璇疯緭鍏SN鍗曞彿" v-model="asnCode"></input>
- </view>
- </form>
-
- <view class="flex solid-bottom padding-sm justify-between">
- <view class="text-blue">鐗╂枡鎬荤被:{{list.length}}</view>
- <view class="text-blue">缁勭洏鎬绘暟:{{allCount}}</view>
</view>
-
- </view>
-
<view class="padding-lr margin-top-sm">
<block v-for="(item, index) in list" :key="index">
<view class="cu-list det menu sm-border margin-bottom-sm " :class="[item.trackCode===barcode&&'act']"
@@ -36,7 +37,7 @@
{{index+1}}
</view>
<view class="text-blue">
- 缂栫爜:
+ 缂栫爜锛�
{{`${item.matnrCode}`}}
</view>
</view>
@@ -46,29 +47,29 @@
</view>
<view class="cu-item">
<view class="content">
- <text class="text-black">鐗╂枡缂栫爜:</text>
+ <text class="text-black">鐗╂枡缂栫爜锛�</text>
<text class="text-grey ">{{item.maktx}}</text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-black">ASN:</text>
+ <text class="text-black">鍗曞彿锛�</text>
</view>
<view class="action">
<text class="text-grey ">{{item.asnCode}}</text>
</view>
- </view>
+ </view>
<view class="cu-item">
<view class="content">
- <text class="text-black">渚涘簲鍟嗘壒娆�:</text>
+ <text class="text-black">渚涘簲鍟嗘壒娆★細</text>
</view>
<view class="action">
<text class="text-grey ">{{item.splrBatch}}</text>
</view>
</view>
- <view class="cu-item">
+ <view class="cu-item">
<view class="content">
- <text class="text-black">璐ㄦ缁撴灉: <text class="text-grey ">{{item.inspect}}</text></text>
+ <text class="text-black">绁ㄥ彿锛�<text class="text-grey ">{{item.crushNo}}</text></text>
</view>
</view>
<!-- <view class="cu-item">
@@ -82,31 +83,30 @@
<view class="cu-item">
<view class="content">
- <text class="text-black">搴撳瓨鍗曚綅: <text class="text-grey ">{{item.stockUnit}}</text></text>
+ <text class="text-black">搴撳瓨鍗曚綅锛� <text class="text-grey ">{{item.stockUnit}}</text></text>
</view>
<view class="content">
- <text class="text-black">鏀惰揣鏁伴噺: <text class="text-grey ">{{item.anfme}}</text></text>
+ <text class="text-black">鏀惰揣鏁伴噺锛� <text class="text-grey ">{{item.anfme}}</text></text>
</view>
<view class="content">
- <text class="text-black">宸蹭笂鏋舵暟閲�: <text
+ <text class="text-black">宸蹭笂鏋舵暟閲忥細 <text
class="text-grey ">{{item.workQty + item.qty}}</text></text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-black">鍙粍鐩樻暟閲�: <text
+ <text class="text-black">鍙粍鐩樻暟閲忥細<text
class="text-grey ">{{item.anfme - item.workQty - item.qty}}</text></text>
</view>
-
</view>
- <view class="cu-item">
+ <view class="cu-item">
<view class="content">
<view class="cu-form-group padding-lr-0">
<view class="title text-blue"><text
- class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺:
+ class="text-red text-xl vertical-middle">*</text>缁勭洏鏁伴噺锛�
</view>
- <uni-number-box style="width: 70%;" :min="0" :max="max" :decimal="2" :step="0.01" v-model="item.receiptQty"
- ></uni-number-box>
+ <uni-number-box style="width: 70%;" :min="0" :max="max" :decimal="2" :step="0.01"
+ v-model="item.receiptQty"></uni-number-box>
</view>
</view>
</view>
@@ -140,108 +140,74 @@
range: [],
asnCode: '',
repeatClick: false,
- isconfirm: false,
- matnrCode:'',
+ fieldsIndex: null,
+ isconfirm: false,
+ matnrCode: '',
max: 99999999,
}
},
computed: {
...mapState('user', ['dynamicFields']),
allCount() {
- return this.list.reduce((acc, row) => +row.anfme + acc, 0) || 0
+ return this.list.reduce((acc, row) => + (row.anfme + acc).toFixed(2), 0) || 0
}
},
mounted() {},
- methods: {
+ methods: {
async search() {
const find = this.list.find(el => el.trackCode === this.barcode);
find ? this.scrollTo() : this.getDet();
-
},
getDet() {
let that = this;
- uni.navigateTo({
- url: "../listing/itemSelect",
- success: function(res) {
- // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- res.eventChannel.emit('data', {
- matnrCode: that.matnrCode,
- asnCode: that.asnCode
- })
- },
- events: {
- // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- backData: function(data) {
- that.showBackData(data.data)
- },
- },
-
-
- });
+ let param = {
+ matnrCode: that.matnrCode.trim(),
+ asnCode: that.asnCode.trim(),
+ fieldsIndex: that.fieldsIndex.trim()
+ }
+ that.getDetl(param);
},
- // async getDet() {
- // let that = this;
- // const {
- // code,
- // data,
- // msg
- // } = await request('/asnOrderItem/trackCode', {
- // matnrCode: that.matnrCode,
- // asnCode: that.asnCode
- // }, "post")
- // if (code === 200) {
- // data.map(item => {
- // item.receiptQty = 0;
- // item.selected = false;
- // })
- // // for (var i = 0; i < data.length; i++) {
- // // data[i].receiptQty =1;
- // // data[i].selected = false;
- // // }
- // if(data !== [] || data !== null){
- // uni.navigateTo({
- // url: "../listing/itemSelect",
- // success: function(res) {
- // // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑
- // res.eventChannel.emit('data', {
- // item: data
- // })
- // },
- // events: {
- // // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨�
- // backData: function(data) {
- // that.showBackData(data.data)
- // },
- // },
-
-
- // });
-
- // }
-
- // // this.list = data
- // } else {
- // uni.showToast({
- // title: msg,
- // icon: "none",
- // position: 'top'
- // })
- // }
- // },
+
+ async getDetl(req) {
+ let that = this;
+ // uni.showLoading({
+ // title: '鍔犺浇涓�...'
+ // })
+ const { code, data, msg } = await request('/asnOrderItem/trackCode', {
+ matnrCode: that.matnrCode,
+ asnCode: that.asnCode,
+ code: that.asnCode,
+ fieldsIndex: that.fieldsIndex,
+ batch: req.batch
+ }, "post")
+ if (code === 200) {
+ for (var i = 0; i < data.length; i++) {
+ data[i].receiptQty = data[i].anfme - data[i].workQty;
+ data[i].crushNo = that.fieldsIndex;
+ data[i].selected = true;
+ }
+ that.fieldsIndex = null;
+ that.showBackData(data)
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+ // uni.hideLoading();
+ },
+
async getList() {
- if(this.container === '' || this.container === null){
+ if (this.container === '' || this.container === null) {
uni.showToast({
title: "瀹瑰櫒鐮佷负绌�",
icon: "none",
position: 'top'
})
- return ;
+ return;
}
- const {
- code,
- data,
- msg
- } = await request('/asnOrderItem/container', {
+ const { code, data, msg } = await request('/asnOrderItem/container', {
barcode: this.container
})
if (code === 200) {
@@ -258,11 +224,11 @@
})
}
},
- showBackData(data){
- let status ;
- data.map(item => {
+ showBackData(data) {
+ let status;
+ data.map(item => {
this.list.push(item)
- })
+ })
let oldLength = this.list.length
this.list = this.list.filter((item, index, self) =>
self.findIndex(i => (
@@ -270,23 +236,21 @@
)) === index && item.isptResult === self[0].isptResult
);
let newLength = this.list.length
-
- if(oldLength > newLength){
+
+ if (oldLength > newLength) {
this.showMsg("鏂版槑缁嗚杩囨护锛岃妫�鏌ョ姸鎬�")
-
}
-
},
- showMsg(msg){
+ showMsg(msg) {
setTimeout(function() {
- uni.showToast({
- icon: "none",
- position: 'top',
- title: msg,
- duration:2000,
- })
+ uni.showToast({
+ icon: "none",
+ position: 'top',
+ title: msg,
+ duration: 2000,
+ })
}, 200);
-
+
},
scrollTo() {
const ref = this.$refs[`${this.barcode}ref`][0];
@@ -316,28 +280,28 @@
this.isconfirm = false
},
async confirm() {
- if(this.container === '' || this.container === null){
+ if (this.container === '' || this.container === null) {
uni.showToast({
title: "瀹瑰櫒鐮佷负绌�",
icon: "none",
position: 'top'
})
- return ;
+ return;
}
- if(this.list.length ===0 || this.list === null){
+ if (this.list.length === 0 || this.list === null) {
uni.showToast({
title: "鏈坊鍔犳槑缁�",
icon: "none",
position: 'top'
})
- return ;
+ return;
}
- this.repeatClick = true
+ this.repeatClick = true
const newArr = this.list.map(item => {
-
+
return {
...item,
- anfme: item.anfme === null ? 0 : +item.anfme,
+ anfme: item.anfme === null ? 0 : +item.anfme,
};
});
@@ -347,7 +311,7 @@
msg
} = await request('/waitPakin/merge', {
items: newArr,
- barcode: this.container,
+ barcode: this.container,
})
if (code === 200) {
uni.showToast({
diff --git a/pages/outbound/PickItemDetl.vue b/pages/outbound/PickItemDetl.vue
new file mode 100644
index 0000000..0bc23ee
--- /dev/null
+++ b/pages/outbound/PickItemDetl.vue
@@ -0,0 +1,234 @@
+<template>
+ <view class="has-foot">
+ <view class="cu-list det menu sm-border">
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">璁㈠崟鍙凤細<text class="text-black ">{{orderDetl.poCode}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">瀹瑰櫒鍙凤細<text class="text-black ">{{orderDetl.barcode}}</text></text>
+ </view>
+ </view>
+ <form>
+ <view class="cu-form-group" v-show="!isconfirm">
+ <view class="title">绁ㄥ彿锛�</view>
+ <input placeholder="璇锋壂鎻忕エ鍙�" v-model="fieldsIndex" focus></input>
+ <text class='cuIcon-close text-gray margin-right-xs' v-show="fieldsIndex!==''" @click="clearCode"></text>
+ <text class='cuIcon-search text-blue' @click="search"></text>
+ </view>
+ </form>
+ </view>
+ <view class="cu-list det menu sm-border">
+ <view class="cu-list det menu noMargin cyan" v-for="(item2,index2) in list" >
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">{{index2+1}}.</text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍝佺鍙风爜锛�<text class="text-black ">{{item2.matnrCode}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍝佺鍚嶇О锛�<text class="text-black ">{{item2.maktx}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item" v-show="!isconfirm">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue"><text class="text-red text-xl vertical-middle">*</text>绁ㄥ彿锛�
+ </view>
+ <input type="input" v-model="item2.extendFields.crushNo" class="text-black">
+ </view>
+ </view>
+ </view>
+ <view class="cu-item" v-show="item2.anfme !== item2.qty">
+ <view class="content">
+ <view class="cu-form-group padding-lr-0">
+ <view class="title text-blue"><text class="text-red text-xl vertical-middle">*</text>鎷o細
+ </view>
+ <uni-number-box style="width: 70%;" :max="max" v-model="item2.anfme"
+ :step='0.01'></uni-number-box>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="cu-bar btn-group foot" v-show="!isconfirm">
+ <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">鎷h揣瀹屾垚</button>
+ </view>
+ </view>
+</template>
+
+<script>
+ import {
+ request
+ } from '../../common/request.js'
+ import {
+ mapState,
+ mapMutations,
+ mapActions,
+ mapGetters
+ } from 'vuex';
+ export default {
+ data() {
+ return {
+ wave: '',
+ list: [],
+ isconfirm: false,
+ fieldsIndex: '',
+ max: 99999999,
+ orderDetl: {},
+ repeatClick: false,
+ }
+ },
+ computed: {
+ ...mapState('user', ['dynamicFields']),
+ ...mapState('user', {
+ dynFields: state => state.dynamicFields
+ }),
+ // allCount() {
+ // return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
+ // },
+ },
+ mounted() {
+
+ },
+ onLoad() {
+ let that = this
+ const eventChannel = this.getOpenerEventChannel();
+ eventChannel.on('pickItemDetl', function(data) {
+ that.orderDetl = data.data
+ })
+ },
+ methods: {
+ clear() {
+ this.fieldsIndex = ''
+ this.list = []
+ },
+ clearCode() {
+ this.fieldsIndex = ''
+ },
+ async search() {
+ let that = this;
+ // if(this.barcode === '' || this.barcode ===null){
+ // return ;
+ // }
+ const { code, data, msg } = await request('/wave/order/items', {
+ barcode: this.orderDetl.barcode,
+ orderId: that.orderDetl.orderId,
+ fieldsIndex: that.fieldsIndex
+ })
+ if (code === 200) {
+ if (Object.keys(data).length === 0) {
+ uni.showToast({
+ title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
+ icon: "none",
+ position: 'top'
+ })
+ }
+ that.list.push(data)
+ that.fieldsIndex = null;
+ } else if (code == 401) {
+ setTimeout(() => {
+ uni.removeStorageSync('token');
+ uni.reLaunch({
+ url: "/pages/login/login"
+ });
+ }, 1000);
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ position: 'top'
+ })
+ }
+
+ },
+ async complete() {
+ let that = this
+ if (that.barcode === '' || that.barcode === null) {
+ uni.showToast({
+ title: "瀹瑰櫒鍙蜂负绌�",
+ icon: "error",
+ })
+ return;
+ }
+ if (that.list === [] || that.list.length === 0) {
+ uni.showToast({
+ title: "鎷h揣鏄庣粏涓虹┖",
+ icon: "error",
+ })
+ return;
+ }
+ this.repeatClick = true
+ const { code, data, msg } = await request('/wave/pick/item', {
+ barcode: that.orderDetl.barcode,
+ orderId: that.orderDetl.orderId,
+ taskItems: that.list
+ })
+ if (code === 200) {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ that.clear()
+ } else {
+ uni.showToast({
+ title: msg,
+ icon: "none",
+ })
+ }
+ this.repeatClick = false
+ },
+ }
+ }
+</script>
+
+<style>
+ .index {
+ border: 1px solid #e54d42;
+ color: #e54d42;
+ border-radius: 50%;
+ display: block;
+ width: 50rpx;
+ height: 50rpx;
+ line-height: 48rpx;
+ text-align: center;
+ margin-right: 20rpx;
+ font-size: 30rpx;
+ }
+
+ .text-blue {
+ color: #0081ff !important;
+
+ }
+
+ .item {
+ position: relative;
+ display: flex;
+ min-height: 80upx;
+ align-items: center;
+ }
+
+ .content2 {
+ /* background-color: coral; */
+ width: 100%;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: flex-end;
+ margin-right: 10px;
+ color: #0081ff;
+ }
+
+ .noMargin {
+ margin-top: 0px;
+ padding: 5px;
+ }
+</style>
\ No newline at end of file
diff --git a/pages/outbound/wavePickItem.vue b/pages/outbound/wavePickItem.vue
index 914589f..be72aea 100644
--- a/pages/outbound/wavePickItem.vue
+++ b/pages/outbound/wavePickItem.vue
@@ -7,100 +7,51 @@
</view> -->
<view class="cu-form-group" v-show="!isconfirm">
<view class="title">瀹瑰櫒鍙�</view>
- <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="barcode" focus></input>
+ <input placeholder="璇锋壂鎻忓鍣ㄥ彿" v-model="barcode" focus></input>
<text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearCode"></text>
<text class='cuIcon-search text-blue' @click="search"></text>
</view>
</form>
- <view class="cu-list det menu sm-border padding">
- <block v-for="(item, index) in list">
- <view class="cu-list det menu ">
-
- <view class="cu-bar bg-white solid-bottom margin-top-sm">
- <view class="action">
- <view class="index">
- {{index+1}}
- </view>
- </view>
- <view class="content2">
- <text class="text-gray"><text class="text-black ">{{item.exceStatus$}}</text></text>
- </view>
- </view>
-
+ <view class="cu-list det menu sm-border">
+ <view class="cu-list det menu noMargin cyan" v-for="(item2,index2) in list" @click="clickTaskItem(index2)">
<view class="cu-item">
<view class="content">
- <text class="text-gray">鐗╂枡缂栫爜:<text class="text-black ">{{item.taskItem.matnrCode}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鐗╂枡鍚嶇О:<text class="text-black ">{{item.taskItem.maktx}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">鎬绘暟閲�:<text class="text-black ">{{item.taskItem.anfme}}</text></text>
- </view>
- </view>
-
- </view>
- <view class="cu-list det menu noMargin " v-for="(item2,index2) in item.wkOrderItems">
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">{{index2+1}}.</text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">璁㈠崟鍙�:<text class="text-black ">{{item2.orderCode}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">闇�姹傛暟閲�:<text class="text-black ">{{item2.anfme}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <text class="text-gray">宸叉嫞鏁伴噺:<text class="text-black ">{{item2.qty}}</text></text>
- </view>
- </view>
- <view class="cu-item">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue"><text
- class="text-red text-xl vertical-middle">*</text>绁ㄥ彿: </view>
- <input type="input" v-model="item2.fieldsIndex" class="text-black">
- </view>
- </view>
- </view>
-<!-- <view class="cu-item grid col-2" v-if="item2.extendFields">
- <view class="item" v-for="el in dynamicFields" :key="el.id">
- <text class="text-black">{{el.fieldsAlise}}:
- <text class="text-grey ">{{item.extendFields[el.fields]}}</text></text>
- </view>
- </view> -->
- <view class="cu-item" v-show="item2.anfme !== item2.qty">
- <view class="content">
- <view class="cu-form-group padding-lr-0">
- <view class="title text-blue"><text
- class="text-red text-xl vertical-middle">*</text>鎷�:</view>
- <uni-number-box style="width: 70%;" :max="max" v-model="item2.demandQty"
- :step='0.01' ></uni-number-box>
- </view>
- </view>
+ <text class="text-gray">{{index2+1}}.</text>
</view>
</view>
<view class="cu-item">
<view class="content">
- <text class="text-gray">鏈鎷h揣鏁伴噺:<text class="text-black ">{{item.wkOrderItems.reduce((total, item) => total + (Number(item.demandQty) ||0 ) , 0)}}</text></text>
- </view>
+ <text class="text-gray">鍑哄簱鍗曞彿锛�<text class="text-black ">{{item2.orderCode}}</text></text>
+ </view>
</view>
- </block>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">DO鍗曞彿锛�<text class="text-black ">{{item2.poCode}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍝佺鍙风爜锛�<text class="text-black ">{{item2.matnrCode}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">鍝佺鍚嶇О锛�<text class="text-black ">{{item2.maktx}}</text></text>
+ </view>
+ </view>
+ <view class="cu-item">
+ <view class="content">
+ <text class="text-gray">闇�姹傛暟閲忥細<text class="text-black ">{{item2.anfme}}</text></text>
+ </view>
+ <view class="content">
+ <text class="text-gray">宸叉嫞鏁伴噺锛�<text class="text-black ">{{item2.qty}}</text></text>
+ </view>
+ </view>
+ </view>
</view>
<view class="cu-bar btn-group foot" v-show="!isconfirm">
- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button>
- <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">鎷h揣瀹屾垚</button>
+ <!-- <button class="cu-btn text-blue line-blue shadow" @click="clear">娓呯┖</button> -->
+ <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="complete">瀹屾垚</button>
</view>
</view>
</template>
@@ -118,45 +69,61 @@
export default {
data() {
return {
- wave:'',
- list: [],
+ wave: '',
+ list: [],
isconfirm: false,
- barcode:'',
+ barcode: '',
max: 99999999,
- repeatClick:false,
+ repeatClick: false,
}
},
computed: {
...mapState('user', ['dynamicFields']),
...mapState('user', {
- dynFields: state => state.dynamicFields
+ dynFields: state => state.dynamicFields
}),
- allCount() {
- return this.list.reduce((acc, row) => + row.receiptQty + acc, 0)
- },
+ // allCount() {
+ // return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
+ // },
},
mounted() {
- console.log(dynamicFields);
+
},
onLoad() {
let that = this
const eventChannel = this.getOpenerEventChannel();
-
eventChannel.on('waveItem', function(data) {
that.wave = data.data
-
})
-
+
},
methods: {
+ //鐐瑰嚮浜嬩欢
+ clickTaskItem(index) {
+ let that = this
+ uni.navigateTo({
+ url: "./PickItemDetl",
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ success: function(res) {
+ res.eventChannel.emit('pickItemDetl', {
+ data: {
+ ...that.list[index],
+ barcode: that.barcode,
+ }
+ })
+ }
+ });
+ },
+
clear() {
this.barcode = ''
this.list = []
},
clearCode() {
- this.barcode = ''
+ this.barcode = ''
},
async search() {
+ let that = this;
this.list = []
// if(this.barcode === '' || this.barcode ===null){
// return ;
@@ -165,61 +132,61 @@
code,
data,
msg
- } = await request('/getContainerWaveList',{
- barcode:this.barcode
- }
- )
- if (code === 200) {
- if (Object.keys(data).length === 0){
+ } = await request('/getContainerWaveList', {
+ barcode: this.barcode
+ })
+ if (code === 200) {
+ if (Object.keys(data).length === 0) {
uni.showToast({
title: "璇ユ爣绛炬湭鏌ヨ鍒版暟鎹�",
icon: "none",
position: 'top'
})
}
- this.list.push(...data)
-
- }else if(code == 401){
+ that.list.push(...data)
+ console.log(that.list);
+
+ } else if (code == 401) {
setTimeout(() => {
uni.removeStorageSync('token');
uni.reLaunch({
url: "/pages/login/login"
});
}, 1000);
- }else {
+ } else {
uni.showToast({
title: msg,
icon: "none",
position: 'top'
})
}
-
-
+
+
},
async complete() {
let that = this
- if(that.barcode === '' || that.barcode === null){
+ if (that.barcode === '' || that.barcode === null) {
uni.showToast({
title: "瀹瑰櫒鍙蜂负绌�",
icon: "error",
})
- return ;
+ return;
}
- if(that.list === [] || that.list.length === 0){
+ if (that.list === [] || that.list.length === 0) {
uni.showToast({
title: "鎷h揣鏄庣粏涓虹┖",
icon: "error",
})
- return ;
+ return;
}
this.repeatClick = true
const {
code,
data,
msg
- } = await request('/saveWavePick',{
- container:that.barcode,
- containerWaveDtos:that.list
+ } = await request('/saveWavePick', {
+ container: that.barcode,
+ containerWaveDtos: that.list
})
if (code === 200) {
uni.showToast({
@@ -264,7 +231,8 @@
min-height: 80upx;
align-items: center;
}
- .content2 {
+
+ .content2 {
/* background-color: coral; */
width: 100%;
display: flex;
@@ -274,7 +242,8 @@
margin-right: 10px;
color: #0081ff;
}
- .noMargin{
+
+ .noMargin {
margin-top: 0px;
padding: 5px;
}
--
Gitblit v1.9.1