From b4109c203742424cc795bdca9ca1e00d5602e241 Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期六, 26 十月 2024 08:24:15 +0800 Subject: [PATCH] # --- pages/home/home.vue | 2 pages/pakin/WarehouseOutMergeBoardMany.vue | 100 ++--- pages/order/pickOrderList.vue | 169 ++++++++ pages/pakin/WarehousePickOutParallelBoard.vue | 105 ++--- pages/order/orderPickConfirm2.vue | 531 +++++++++++++++++++++++++++ pages.json | 30 + pages/pakin/pickOrderList.vue | 154 ++++++++ pages/pakin/WarehouseOutParallelBoard.vue | 12 static/css/wms.css/wms.css | 2 9 files changed, 975 insertions(+), 130 deletions(-) diff --git a/pages.json b/pages.json index 6124dea..f5b0de6 100644 --- a/pages.json +++ b/pages.json @@ -331,7 +331,35 @@ "navigationStyle": "custom" } } - ], + ,{ + "path" : "pages/order/orderPickConfirm2", + "style" : + { + // "navigationBarTitleText" : "骞舵澘鍏ュ簱", + // "enablePullDownRefresh" : false + "navigationStyle": "custom" + } + } + ,{ + "path" : "pages/order/pickOrderList", + "style" : + { + // "navigationBarTitleText": "璁㈠崟鐗╂枡", + // "enablePullDownRefresh": false + "navigationStyle": "custom" + } + + } + ,{ + "path" : "pages/pakin/pickOrderList", + "style" : + { + "navigationBarTitleText": "璁㈠崟鐗╂枡", + "enablePullDownRefresh": false + } + + } + ], "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "uni-app", diff --git a/pages/home/home.vue b/pages/home/home.vue index 18feabd..4126ada 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -81,7 +81,7 @@ name: 'orderPickConfirm', color: 'green', cuIcon: 'pulldown', - url: '/order/orderPickConfirm' + url: '/order/orderPickConfirm2' }, { title: '骞舵澘閫斾腑鎷f枡', diff --git a/pages/order/orderPickConfirm2.vue b/pages/order/orderPickConfirm2.vue new file mode 100644 index 0000000..f755424 --- /dev/null +++ b/pages/order/orderPickConfirm2.vue @@ -0,0 +1,531 @@ +<template> + <view> + <view class="status_bar"> + <!-- 杩欓噷鏄姸鎬佹爮 --> + </view> + <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="骞舵澘鍏ュ簱" @clickLeft="back" :fixed="true" + :border="false" rightWidth="160rpx" leftWidth="160rpx" + > + <block slot="right"> + <view class="city"> + <view> + <text class="uni-nav-bar-text">{{store}}</text> + </view> + </view> + </block> + </uni-nav-bar> + <view class="code"> + <view class="item"> + <view class="code-decs">搴撲綅鍙�:</view> + <uni-combox :candidates="locNoList" placeholder="璇烽�夋嫨搴撲綅鍙�" v-model="locNo" + @input="getLocNoList"></uni-combox> + </view> + <view class="item"> + <view class="code-decs">绔欑偣:</view> + <uni-combox :candidates="staList" placeholder="璇烽�夋嫨绔欑偣" v-model="sta" + @input="getPickStaList"></uni-combox> + <button size="mini" type="primary" @click="getMat">鎻愬彇鐗╂枡</button> + </view> + <!-- <view class="item"> + <view class="code-decs">鐗╂枡鍙�:</view> + <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" @input="getMatList()"> + </view> --> + </view> + <view class="mat-list-title"> + <view>鍟嗗搧鍒楄〃</view> + </view> + <scroll-view> + <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> + <!-- <view class="aside"> + <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)" /> + </view> --> + <view class="list-left" style="margin: 0;"> + <view class="list-left-item"> + <view class="desc">No锛歿{i + 1}}</view> + </view> + <view class="list-left-item"> + <view class="desc">璁㈠崟鍙凤細{{item.orderNo}}</view> + </view> + <view class="list-left-item"> + <view class="desc">鏂欏彿锛歿{item.matnr}}</view> + </view> + <view class="list-left-item"> + <view class="desc">鎵瑰彿锛歿{item.batch}}</view> + </view> + <view class="list-left-item"> + <view class="desc">鍙敤鏁伴噺锛歿{item.count}}</view> + </view> + <view class="list-left-item" > + <view class="desc">鏁伴噺锛歿{item.useCount}}</view> + </view> + </view> + <view class="list-right"> + <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> + <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> + </view> + </checkbox-group> + </scroll-view> + <!-- 搴曢儴鎿嶄綔鎸夐挳 --> + <view class="buttom"> + <button size="mini" @click="reset('warn')">閲嶇疆</button> + <button size="mini" type="primary" @click="combConfirm('warn')">骞舵澘</button> + </view> + <!-- 寮圭獥 --> + <!-- 淇敼鏁伴噺 --> + <view> + <uni-popup ref="revise" type="dialog"> + <view class="popup"> + <!-- 鏍囬 --> + <view class="title">淇敼</view> + <view class="popup-item"> + <view class="popup-item-left">鏂欏彿:</view> + <view class="popup-item-right"> + <input type="text" v-model="matnr1" disabled="true" + style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;"> + </view> + </view> + <!-- <view class="popup-item"> + <view class="popup-item-left">鎵瑰彿:</view> + <view class="popup-item-right"><input type="text" v-model="batch"></view> + </view> --> + <!-- <view class="popup-item"> + <view class="popup-item-left">閲嶉噺:</view> + <view class="popup-item-right"><input type="text" v-model="weight"></view> + </view> --> + <view class="popup-item"> + <view class="popup-item-left">鏁伴噺:</view> + <view class="popup-item-right" style="border: none;justify-content: center;"> + <uni-number-box :value="count" :step='1' :max="mastCount" color="#747474" @change="changeValue" /> + </view> + </view> + <view class="btn"> + <view class="btn-left" @click="reviseClose">鍙栨秷</view> + <view class="btn-right" @click="reviseConfirm()">淇敼</view> + </view> + </view> + </uni-popup> + </view> + <!-- 绉婚櫎纭 --> + <view> + <!-- 鎻愮ず绐楃ず渚� --> + <uni-popup ref="alertDialog" type="dialog"> + <uni-popup-dialog :type="msgType" confirmText="绉婚櫎" :title="title" :content="content" + @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog> + </uni-popup> + </view> + <view> + <!-- 鎻愮ず淇℃伅寮圭獥 --> + <uni-popup ref="message" type="message"> + <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> + </uni-popup> + </view> + <!-- 纭缁勬墭 --> + <view> + <uni-popup ref="combConfirm" type="dialog"> + <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content" + @confirm="comb" @close="combClose"></uni-popup-dialog> + </uni-popup> + </view> + <!-- 纭閲嶇疆 --> + <view> + <uni-popup ref="resetConfirm" type="dialog"> + <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content" + @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog> + </uni-popup> + </view> + <view> + <!-- 鎻愮ず淇℃伅寮圭獥 --> + <uni-popup ref="message" type="message"> + <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> + </uni-popup> + </view> + </view> +</template> + +<script> + export default { + data() { + return { + baseUrl: '', + token: '', + storeId: 0, + store: '', + locNo: '', + locNoList: [], + sta: '106', + staList: [], + dataList: [], + checkedDataList: [], + matnr: '', + showChecked: false, + count: 0, + rowNum: '', + matnr1: '', + batch: '', + weight: '', + msgType1: 'success', + msgType: 'success', + messageText: '', + title: '', + content: '', + matFocus: false, + matData: '', + removeNum: 0, + orderNoList: [], + orderNo: '', + mastCount: 0 + } + }, + onShow() { + this.baseUrl = uni.getStorageSync('baseUrl'); + this.token = uni.getStorageSync('token'); + this.getPickStaList() + // this.getMatList() + this.getLocNoList() + this.storeId = uni.getStorageSync('store') + if (this.storeId == 1) { + this.store = '瀹佹尝浠�' + } + if (this.storeId == 2) { + this.store = '鏂版槍浠�' + } + }, + methods: { + back() { uni.navigateBack({}) }, + set(e) { + var ck = this.dataList[e].checked + this.dataList[e].checked = ck ? false : true + }, + getMat() { + let _this = this + uni.navigateTo({ + url: './pickOrderList', + success(res) { + res.eventChannel.emit('matList', { + matList: _this.dataList + }) + }, + events: { + sMat: function(data) { + _this.dataList.push(data.data) + console.log(data); + } + } + }) + }, + + getLocNoList() { + let that = this + uni.request({ + url: that.baseUrl + '/mobile/loc/f/list', + header: { 'token': uni.getStorageSync('token') }, + data: { locNo: that.locNo }, + method: 'GET', + success(res) { + res = res.data; + if (res.code === 200) { + let data = res.data + let list = [] + data.forEach((item) => { + list.push(item.locNo) + }) + that.locNoList = list; + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + } + } + }) + }, + getPickStaList() { + let that = this + uni.request({ + url: that.baseUrl + '/mobile/pick/sta/list', + header: { + 'token': uni.getStorageSync('token') + }, + method: 'GET', + success(res) { + res = res.data; + if (res.code === 200) { + let data = res.data + let list = [] + data.forEach((item) => { + list.push(item.stnNo) + }) + that.staList = list; + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + } + } + }) + }, + getMatList() { + let that = this + uni.request({ + url: that.baseUrl + '/mobile/pick/mat/list', + header: { + 'token': uni.getStorageSync('token') + }, + data: { + matnr: that.matnr, + }, + method: 'GET', + success(res) { + res = res.data; + if (res.code === 200) { + that.showChecked = false + that.dataList = res.data + for (var i = 0; i < that.dataList.length; i++) { + that.$set(that.dataList[i], 'checked', false) + } + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + } + } + }) + + }, + getChecked() { + let checkedList = this.checkedDataList; + for (var i = 0; i < this.dataList.length; i++) { + var t = !this.dataList[i].checked + if (this.dataList[i].checked) { + let data = this.dataList[i] + data.useCount = data.count + checkedList.push(data) + } + } + this.matnr = "" + this.checkedDataList = checkedList; + this.switchCheckedList() + }, + switchCheckedList() { + this.dataList = this.checkedDataList; + this.showChecked = true; + }, + checkboxChange: function(e) {}, + messageToggle(type) { + this.msgType1 = type + this.$refs.message.open() + }, + combConfirm(type) { + this.msgType = type + this.title = '璀﹀憡' + this.content = '鏄惁鐜板湪骞舵澘!' + this.$refs.combConfirm.open() + }, + comb() { + uni.vibrateShort(); + let that = this; + if (that.dataList.length === 0) { + uni.showToast({ title: "璇烽�夋嫨骞舵澘鍟嗗搧", icon: "error", position: 'center' }) + return; + } + if (that.locNo == '') { + uni.showToast({ title: "搴撲綅鍙蜂笉鑳戒负绌�", icon: "error", position: 'center' }) + return; + } + if (that.sta == '') { + uni.showToast({ title: "绔欑偣涓嶈兘涓虹┖", icon: "error", position: 'center' }) + return; + } + for (var i = 0; i < that.dataList.length; i++) { + if (that.dataList[i].useCount == 0 || that.dataList[i].useCount == '') { + uni.showToast({ title: "骞舵澘鏁伴噺涓嶈兘涓�0", icon: "error", position: 'center' }) + return; + } + } + + let param = { + locNo: that.locNo, + staNo: that.sta, + list: that.dataList + } + uni.request({ + url: that.baseUrl + '/mobile/pick/in', + data: JSON.stringify(param), + method: 'POST', + header: { + 'token': uni.getStorageSync('token') + }, + success(result) { + var res = result.data + if (res.code === 200) { + that.resst(); + uni.showToast({ title: "骞舵澘鎴愬姛", icon: "success", position: 'center' }) + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "success", position: 'center' }) + setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "success", position: 'center' }) + } + } + }); + }, + reset(type) { + this.msgType = type + this.title = '璀﹀憡' + this.content = '鏄惁閲嶇疆!' + this.$refs.resetConfirm.open() + }, + // 纭閲嶇疆 + resetConfirm() { + this.dataList = [] + this.orderNo = '' + this.barcode = '' + this.checkedDataList = [] + this.messageText = "閲嶇疆瀹屾垚" + this.messageToggle('success') + }, + // 鍙栨秷閲嶇疆 + resetClose() { + + }, + // 淇敼鎵瑰彿 + revise(item, i) { + this.matnr1 = this.dataList[i].matnr + this.count = this.dataList[i].useCount + this.batch = this.dataList[i].batch + this.weight = this.dataList[i].weight + this.rowNum = i + this.mastCount = this.dataList[i].count + this.eject() + }, + eject(type) { + this.type = type + this.$refs.revise.open(type) + }, + // 鍒楄〃绉婚櫎鎸夐挳 + remove(item, i, type) { + this.removeNum = i + this.msgType = type + this.title = '璀﹀憡' + this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!' + this.$refs.alertDialog.open(i) + }, + // 纭绉婚櫎 + removeConfirm(i) { + this.messageText = "绉婚櫎鎴愬姛" + this.messageToggle('success') + this.dataList.splice(this.removeNum, 1) + }, + reviseConfirm() { + this.dataList[this.rowNum].useCount = this.count + this.dataList[this.rowNum].batch = this.batch + this.messageText = "淇敼鎴愬姛" + this.messageToggle('success') + this.$refs.revise.close() + this.$forceUpdate() // 寮哄埗鍒锋柊 + }, + reviseClose() { + this.$refs.revise.close() + }, + changeValue(value) { + this.count = value + }, + // 娓呯┖ + resst() { + this.dataList = [] + this.checkedDataList = [] + this.locNo = '' + this.sta = '' + }, + combClose() { + this.$refs.combConfirm.close() + }, + // 鍙栨秷绉婚櫎 + removeClose() { + this.$refs.alertDialog.close() + }, + } + } +</script> + +<style> + @import url('../../static/css/wms.css/wms.css'); + + .list { + display: flex; + min-height: 80rpx; + background-color: #FFF; + margin: 20rpx 20rpx; + border-radius: 20rpx; + box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.2); + } + + .list:first-child { + margin-top: 330rpx; + } + + .list:last-child { + margin-bottom: 120rpx; + } + + .aside { + width: 100rpx; + /* background-color: #303133; */ + display: flex; + align-items: center; + justify-content: center; + } + + .code { + width: 100%; + position: fixed; + min-height: 200rpx; + background-color: #FFF; + z-index: 10; + } + + .item { + display: flex; + align-items: center; + height: 100rpx; + margin-left: 20rpx; + border-bottom: 1px solid #DCDFE6; + } + + .item input { + height: 50rpx; + line-height: 50rpx; + /* font-family: PingFang SC; uniapp 榛樿瀛椾綋涓嶅眳涓� */ + font-size: 36upx; + font-family: PingFang SC; + width: 55vw; + + } + + .code-decs { + width: 20vw; + font-size: 18px; + color: #303133; + } + + .item-right { + margin-left: auto; + margin-right: 20rpx; + } + + .mat-list-title { + display: flex; + align-items: center; + justify-content: center; + height: 80rpx; + width: 100%; + background-color: white; + position: fixed; + margin-top: 200rpx; + z-index: 9; + /* border-top: 1px solid #DCDFE6; */ + box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); + } +</style> diff --git a/pages/order/pickOrderList.vue b/pages/order/pickOrderList.vue new file mode 100644 index 0000000..3224d7a --- /dev/null +++ b/pages/order/pickOrderList.vue @@ -0,0 +1,169 @@ +<template> + <view> + <view class="status_bar"> + <!-- 杩欓噷鏄姸鎬佹爮 --> + </view> + <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="璁㈠崟鐗╂枡" @clickLeft="back" :fixed="true" + :border="false" rightWidth="160rpx" leftWidth="160rpx" + > + <block slot="right"> + <view class="city"> + <view> + <text class="uni-nav-bar-text">{{store}}</text> + </view> + </view> + </block> + </uni-nav-bar> + + <view class="code"> + <view style="display: flex;align-items: center;"> + <view style="width: 70rpx;padding-left: 20rpx;" @click="changeST">{{searchType}}</view> + <view style="flex: 1;margin-left: -8rpx;"> + <uni-search-bar v-model="searchValue" + maxlength="500" ancel="cancel" @confirm="getMatList()" @clear="clear" placeholder="杈撳叆 / 鎵弿"> + </uni-search-bar> + </view> + + </view> + <view class="code-title"> + <view></view> + <view style="width: 100%;text-align: center;margin: 16rpx 0;">{{searchValue}} 鎬绘暟閲忥細- {{total}} -</view> + </view> + </view> + + <view class="order__list" v-for="(orderDetl,index) in dataList" :key="index"> + <view class="order__list__left"> + <view>No锛歿{index + 1}}</view> + <view>璁㈠崟鍙凤細{{orderDetl.orderNo}}</view> + <view>鏂欏彿锛歿{orderDetl.matnr}}</view> + <view>鎵瑰彿锛歿{orderDetl.batch}}</view> + <view>鍙敤鏁伴噺锛歿{orderDetl.count}}</view> + </view> + <view class="order__list__right" @click="addItem(orderDetl)"> + <uni-icons type="folder-add" size="25" color="#fff"></uni-icons> + </view> + </view> + <view style="height: 100rpx;width: 100%;text-align: center;line-height: 100rpx;">- 宸茬粡鍒板簳浜� -</view> + </view> +</template> + +<script> + export default { + data() { + return { + baseUrl: '', + token: '', + storeId: 0, + store: '', + total: 0, + searchType: '鐗╂枡', + searchValue: '', + dataList: [], + selectedList: [] + } + }, + onShow() { + let _this = this + this.baseUrl = uni.getStorageSync('baseUrl'); + this.token = uni.getStorageSync('token'); + this.storeId = uni.getStorageSync('store') + if (this.storeId == 1) { + this.store = '瀹佹尝浠�' + } + if (this.storeId == 2) { + this.store = '鏂版槍浠�' + } + const eventChannel = this.getOpenerEventChannel(); + eventChannel.on('matList', function(data) { + _this.selectedList = data.matList + }) + this.getMatList() + }, + methods: { + back() { uni.navigateBack({}) }, + set(e) { + var ck = this.dataList[e].checked + this.dataList[e].checked = ck ? false : true + }, + changeST() { + if (this.searchType == '鐗╂枡') this.searchType = '璁㈠崟' + else this.searchType = '鐗╂枡' + }, + getMatList() { + let that = this + let searchParam = {} + if (this.searchType == '鐗╂枡') searchParam = {matnr: that.searchValue} + else searchParam = {orderNo: that.searchValue} + console.log(searchParam); + uni.request({ + url: that.baseUrl + '/mobile/pick/mat/list', + header: { + 'token': uni.getStorageSync('token') + }, + data: searchParam, + method: 'GET', + success(res) { + res = res.data; + if (res.code === 200) { + that.total = res.data.length + const result1 = res.data.filter(obj1 => + !that.selectedList.some(obj2 => obj1.matnr === obj2.matnr && obj1.orderNo === obj2.orderNo) + ); + that.dataList = result1 + that.total = result1.length + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + } + } + }) + + }, + addItem(mat) { + this.getOpenerEventChannel().emit('sMat', {data: mat}); + uni.navigateBack({ + + }) + } + } + } +</script> + +<style> + @import url('../../static/css/wms.css/wms.css'); + .code { + background-color: #d9d9d9; + z-index: 99; + position: sticky; + top: 0rpx; + left: 0; + } + .code-title { + display: flex; + } + .order__list { + margin: 20rpx; + font-size: 14px; + background-color: #fff; + border-radius: 20rpx; + border: 1px solid #eeeeee; + display: flex; + position: relative; + background-color: #3eb689; + color: #FFF; + } + .order__list__left { + flex: 1; + padding: 20rpx; + position: relative; + } + .order__list__right { + width: 70rpx; + border-left: 1px solid #eeeeee; + display: flex; + align-items: center; + justify-content: center; + } +</style> diff --git a/pages/pakin/WarehouseOutMergeBoardMany.vue b/pages/pakin/WarehouseOutMergeBoardMany.vue index a2f15ee..40e0ce5 100644 --- a/pages/pakin/WarehouseOutMergeBoardMany.vue +++ b/pages/pakin/WarehouseOutMergeBoardMany.vue @@ -2,66 +2,35 @@ <view> <view class="code"> <view class="item"> - <view class="code-decs" style="width: 100%;">鎵樼洏鐮�:{{barcode}}</view> - </view> - <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="barcodeFocus" - @input="barcodeInput()"> + <view class="code-decs" style="width: 70%;">鎵樼洏鐮�:{{barcode}}</view> + <button size="mini" type="primary" @click="getMat">鎻愬彇鐗╂枡</button> </view> </view> <view class="mat-list-title"> <view style="margin-top: 5px;">鍟嗗搧鍒楄〃</view> <view> - <button size="mini" type="primary" @click="getChecked">鎻愬彇</button> - <!-- <button style="margin-left: 10px;" size="mini" type="primary" @click="reset()">娓呯┖</button> --> </view> </view> <scroll-view> <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> - <view class="aside"> - <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> - </view> <view class="list-left" style="margin: 0;"> <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> + <view class="desc">No锛歿{i + 1}}</view> </view> <view class="list-left-item"> - <view class="desc">璁㈠崟鍙凤細</view> - <view class="left-item"> - <uni-tag :text="item.orderNo" type="primary"></uni-tag> - </view> + <view class="desc">璁㈠崟鍙凤細{{item.orderNo}}</view> </view> <view class="list-left-item"> - <view class="desc">鏂欏彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.matnr" type="primary"></uni-tag> - </view> + <view class="desc">鏂欏彿锛歿{item.matnr}}</view> </view> <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> + <view class="desc">鎵瑰彿锛歿{item.batch}}</view> </view> <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</view> + <view class="desc">鍙敤鏁伴噺锛歿{item.count}}</view> </view> - <view class="list-left-item"> - <view class="desc">鎵瑰彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.batch" type="warning"></uni-tag> - </view> - </view> - <!-- <view class="list-left-item"> - <view class="desc">閲嶉噺锛�</view> - <view class="left-item"> - <uni-tag :text="item.weight" type="warning"></uni-tag> - </view> - </view> --> - <view class="list-left-item"> - <view class="desc">鏁伴噺锛�</view> - <view class="left-item">{{item.anfme}}</view> + <view class="list-left-item" > + <view class="desc">鏁伴噺锛歿{item.useCount}}</view> </view> </view> <view class="list-right"> @@ -100,7 +69,7 @@ <view class="popup-item"> <view class="popup-item-left">鏁伴噺:</view> <view class="popup-item-right" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" + <uni-number-box :value="count" :step='1' :max="mastCount" color="#747474" @change="changeValue" /> </view> </view> @@ -178,7 +147,8 @@ orderNoList: [], orderNo: '', item:'', - locNo:'' + locNo:'', + mastCount: 0 } }, onLoad() { @@ -195,6 +165,22 @@ this.getOrderNoList() }, methods: { + getMat() { + let _this = this + uni.navigateTo({ + url: '../order/pickOrderList', + success(res) { + res.eventChannel.emit('matList', { + matList: _this.dataList + }) + }, + events: { + sMat: function(data) { + _this.dataList.push(data.data) + } + } + }) + }, set(e) { var ck = this.dataList[e].checked this.dataList[e].checked = ck ? false:true @@ -419,11 +405,6 @@ comb() { uni.vibrateShort(); let that = this; - if (that.orderNo === '') { - this.messageText = "璇疯緭鍏ヨ鍗曞彿" - this.messageToggle('error') - return; - } if (that.barcode === '') { this.messageText = "鎵樼洏鐮佷笉鑳戒负绌�" this.messageToggle('error') @@ -434,12 +415,8 @@ this.messageToggle('error') return; } - for (var i = 0; i < that.dataList.length; i++) { - if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') { - this.messageText = that.dataList[i].matnr + '鏁伴噺涓嶈兘涓�0' - this.messageToggle('error') - return; - } + for (let item of this.dataList) { + item['anfme'] = item.useCount } uni.request({ url: that.baseUrl + '/mobile/pda/WarehouseOutMergeBoardMany/v1', @@ -454,9 +431,7 @@ success(result) { var res = result.data if (res.code === 200) { - that.orderNo = "" that.dataList = [] - // that.resst(); that.messageText = "骞舵澘鎴愬姛" that.messageToggle('success') } else if (res.code == 403) { @@ -494,10 +469,11 @@ // 淇敼鎵瑰彿 revise(item, i) { this.matnr1 = this.dataList[i].matnr - this.count = this.dataList[i].anfme + this.count = this.dataList[i].useCount this.batch = this.dataList[i].batch this.weight = this.dataList[i].weight this.rowNum = i + this.mastCount = this.dataList[i].count this.eject() }, eject(type) { @@ -519,7 +495,7 @@ this.dataList.splice(this.removeNum, 1) }, reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count + this.dataList[this.rowNum].useCount = this.count this.dataList[this.rowNum].batch = this.batch this.dataList[this.rowNum].weight = this.weight this.messageText = "淇敼鎴愬姛" @@ -563,7 +539,7 @@ } .list:first-child { - margin-top: 360rpx; + margin-top: 200rpx; } .list:last-child { @@ -581,7 +557,7 @@ .code { width: 100%; position: fixed; - min-height: 200rpx; + min-height: 70rpx; background-color: #FFF; z-index: 10; } @@ -589,7 +565,7 @@ .item { display: flex; align-items: center; - height: 100rpx; + height: 70rpx; margin-left: 20rpx; border-bottom: 1px solid #DCDFE6; } @@ -618,11 +594,11 @@ .mat-list-title { /* display: flex; align-items: center; */ - height: 120rpx; + height: 60rpx; width: 100%; background-color: white; position: fixed; - margin-top: 200rpx; + margin-top: 70rpx; z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; diff --git a/pages/pakin/WarehouseOutParallelBoard.vue b/pages/pakin/WarehouseOutParallelBoard.vue index 1e16cca..be22bab 100644 --- a/pages/pakin/WarehouseOutParallelBoard.vue +++ b/pages/pakin/WarehouseOutParallelBoard.vue @@ -5,11 +5,11 @@ <view class="item" style="width: 50%;"> <view class="code-decs" style="width: 100%;">搴撲綅鍙�:{{item.locNo}}</view> </view> - <view class="item" style="width: 50%;"> + </view> + <view class="item"> + <view class="item" style="width: 90%;"> <view class="code-decs" style="width: 100%;">鐗╂枡:{{item.matnr}}</view> </view> - - </view> <view class="item"> <view class="code-decs">璁㈠崟鍙�:</view> @@ -20,7 +20,7 @@ <view class="mat-list-title"> <view style="width: 200rpx;"></view> <view style="-webkit-flex: 1;flex: 1;">鍟嗗搧鍒楄〃</view> - <view style="width: 200rpx;"><button size="mini" type="primary" @click="reset()">娓呯┖</button></view> + <view style="width: 200rpx;"></view> </view> <scroll-view> <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> @@ -77,7 +77,7 @@ </scroll-view> <!-- 搴曢儴鎿嶄綔鎸夐挳 --> <view class="buttom"> - <!-- <button size="mini" @click="reset('warn')">閲嶇疆</button> --> + <button size="mini" @click="reset('warn')">娓呯┖</button> <button size="mini" type="primary" @click="combConfirm('warn')">褰撳墠搴撲綅鎷i��</button> </view> <!-- 寮圭獥 --> @@ -586,7 +586,7 @@ .item { display: flex; align-items: center; - height: 100rpx; + height: 70rpx; margin-left: 20rpx; border-bottom: 1px solid #DCDFE6; } diff --git a/pages/pakin/WarehousePickOutParallelBoard.vue b/pages/pakin/WarehousePickOutParallelBoard.vue index c2e507e..f2226ff 100644 --- a/pages/pakin/WarehousePickOutParallelBoard.vue +++ b/pages/pakin/WarehousePickOutParallelBoard.vue @@ -2,66 +2,40 @@ <view> <view class="code"> <view class="item"> - <view class="code-decs" style="width: 100%;">搴撲綅鍙�:{{locNo}}</view> + <view class="code-decs" style="width: 70%;">搴撲綅鍙�:{{locNo}}</view> + <button size="mini" type="primary" @click="getMat">鎻愬彇鐗╂枡</button> </view> - <view class="item"> + <!-- <view class="item"> <view class="code-decs">璁㈠崟鍙�:</view> <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="barcodeFocus" @input="barcodeInput()"> - </view> + </view> --> </view> <view class="mat-list-title"> <view style="margin-top: 5px;">鍟嗗搧鍒楄〃</view> <view> - <button size="mini" type="primary" @click="getChecked">鎻愬彇</button> - <!-- <button style="margin-left: 10px;" size="mini" type="primary" @click="reset()">娓呯┖</button> --> </view> </view> <scroll-view> <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> - <view class="aside"> - <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> - </view> <view class="list-left" style="margin: 0;"> <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> + <view class="desc">No锛歿{i + 1}}</view> </view> <view class="list-left-item"> - <view class="desc">璁㈠崟鍙凤細</view> - <view class="left-item"> - <uni-tag :text="item.orderNo" type="primary"></uni-tag> - </view> + <view class="desc">璁㈠崟鍙凤細{{item.orderNo}}</view> </view> <view class="list-left-item"> - <view class="desc">鏂欏彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.matnr" type="primary"></uni-tag> - </view> + <view class="desc">鏂欏彿锛歿{item.matnr}}</view> </view> <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> + <view class="desc">鎵瑰彿锛歿{item.batch}}</view> </view> <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</view> + <view class="desc">鍙敤鏁伴噺锛歿{item.count}}</view> </view> - <view class="list-left-item"> - <view class="desc">鎵瑰彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.batch" type="warning"></uni-tag> - </view> - </view> - <!-- <view class="list-left-item"> - <view class="desc">閲嶉噺锛�</view> - <view class="left-item"> - <uni-tag :text="item.weight" type="warning"></uni-tag> - </view> - </view> --> - <view class="list-left-item"> - <view class="desc">鏁伴噺锛�</view> - <view class="left-item">{{item.anfme}}</view> + <view class="list-left-item" > + <view class="desc">鏁伴噺锛歿{item.useCount}}</view> </view> </view> <view class="list-right"> @@ -100,7 +74,7 @@ <view class="popup-item"> <view class="popup-item-left">鏁伴噺:</view> <view class="popup-item-right" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" + <uni-number-box :value="count" :step='1' :max="mastCount" color="#747474" @change="changeValue" /> </view> </view> @@ -178,7 +152,8 @@ orderNoList: [], orderNo: '', item:'', - locNo:'' + locNo:'', + mastCount: 0 } }, onLoad() { @@ -195,6 +170,22 @@ this.getOrderNoList() }, methods: { + getMat() { + let _this = this + uni.navigateTo({ + url: '../order/pickOrderList', + success(res) { + res.eventChannel.emit('matList', { + matList: _this.dataList + }) + }, + events: { + sMat: function(data) { + _this.dataList.push(data.data) + } + } + }) + }, set(e) { var ck = this.dataList[e].checked this.dataList[e].checked = ck ? false:true @@ -419,11 +410,11 @@ comb() { uni.vibrateShort(); let that = this; - if (that.orderNo === '') { - this.messageText = "璇疯緭鍏ヨ鍗曞彿" - this.messageToggle('error') - return; - } + // if (that.orderNo === '') { + // this.messageText = "璇疯緭鍏ヨ鍗曞彿" + // this.messageToggle('error') + // return; + // } if (that.locNo === '') { this.messageText = "搴撲綅鍙蜂笉鑳戒负绌�" this.messageToggle('error') @@ -434,18 +425,14 @@ this.messageToggle('error') return; } - for (var i = 0; i < that.dataList.length; i++) { - if (that.dataList[i].anfme == 0 || that.dataList[i].anfme == '') { - this.messageText = that.dataList[i].matnr + '鏁伴噺涓嶈兘涓�0' - this.messageToggle('error') - return; - } + for (let item of this.dataList) { + item['anfme'] = item.useCount } uni.request({ url: that.baseUrl + '/mobile/pda/WarehouseOutPickMerge/v1', data: JSON.stringify({ locNo: that.locNo, - orderNo: that.orderNo, + // orderNo: that.orderNo, combMats: that.dataList }), method: 'POST', @@ -495,10 +482,11 @@ // 淇敼鎵瑰彿 revise(item, i) { this.matnr1 = this.dataList[i].matnr - this.count = this.dataList[i].anfme + this.count = this.dataList[i].useCount this.batch = this.dataList[i].batch this.weight = this.dataList[i].weight this.rowNum = i + this.mastCount = this.dataList[i].count this.eject() }, eject(type) { @@ -520,7 +508,7 @@ this.dataList.splice(this.removeNum, 1) }, reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count + this.dataList[this.rowNum].useCount = this.count this.dataList[this.rowNum].batch = this.batch this.dataList[this.rowNum].weight = this.weight this.messageText = "淇敼鎴愬姛" @@ -537,7 +525,6 @@ // 娓呯┖ resst() { this.dataList = [] - this.locNo = '' this.barcodeFocuss() }, combClose() { @@ -564,7 +551,7 @@ } .list:first-child { - margin-top: 360rpx; + margin-top: 200rpx; } .list:last-child { @@ -582,7 +569,7 @@ .code { width: 100%; position: fixed; - min-height: 200rpx; + min-height: 70rpx; background-color: #FFF; z-index: 10; } @@ -590,7 +577,7 @@ .item { display: flex; align-items: center; - height: 100rpx; + height: 70rpx; margin-left: 20rpx; border-bottom: 1px solid #DCDFE6; } @@ -619,11 +606,11 @@ .mat-list-title { /* display: flex; align-items: center; */ - height: 120rpx; + height: 60rpx; width: 100%; background-color: white; position: fixed; - margin-top: 200rpx; + margin-top: 70rpx; z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; diff --git a/pages/pakin/pickOrderList.vue b/pages/pakin/pickOrderList.vue new file mode 100644 index 0000000..8724b01 --- /dev/null +++ b/pages/pakin/pickOrderList.vue @@ -0,0 +1,154 @@ +<template> + <view> + + <view class="code"> + <view style="display: flex;align-items: center;"> + <view style="width: 70rpx;padding-left: 20rpx;" @click="changeST">{{searchType}}</view> + <view style="flex: 1;margin-left: -8rpx;"> + <uni-search-bar v-model="searchValue" + maxlength="500" ancel="cancel" @confirm="getMatList()" @clear="clear" placeholder="杈撳叆 / 鎵弿"> + </uni-search-bar> + </view> + + </view> + <view class="code-title"> + <view></view> + <view style="width: 100%;text-align: center;margin: 16rpx 0;">{{searchValue}} 鎬绘暟閲忥細- {{total}} -</view> + </view> + </view> + + <view class="order__list" v-for="(orderDetl,index) in dataList" :key="index"> + <view class="order__list__left"> + <view>No锛歿{index + 1}}</view> + <view>璁㈠崟鍙凤細{{orderDetl.orderNo}}</view> + <view>鏂欏彿锛歿{orderDetl.matnr}}</view> + <view>鎵瑰彿锛歿{orderDetl.batch}}</view> + <view>鍙敤鏁伴噺锛歿{orderDetl.count}}</view> + </view> + <view class="order__list__right" @click="addItem(orderDetl)"> + <uni-icons type="folder-add" size="25" color="#fff"></uni-icons> + </view> + </view> + <view style="height: 100rpx;width: 100%;text-align: center;line-height: 100rpx;">- 宸茬粡鍒板簳浜� -</view> + </view> +</template> + +<script> + export default { + data() { + return { + baseUrl: '', + token: '', + storeId: 0, + store: '', + total: 0, + searchType: '鐗╂枡', + searchValue: '', + dataList: [], + selectedList: [] + } + }, + onShow() { + let _this = this + this.baseUrl = uni.getStorageSync('baseUrl'); + this.token = uni.getStorageSync('token'); + this.storeId = uni.getStorageSync('store') + if (this.storeId == 1) { + this.store = '瀹佹尝浠�' + } + if (this.storeId == 2) { + this.store = '鏂版槍浠�' + } + const eventChannel = this.getOpenerEventChannel(); + eventChannel.on('matList', function(data) { + _this.selectedList = data.matList + }) + this.getMatList() + }, + methods: { + back() { uni.navigateBack({}) }, + set(e) { + var ck = this.dataList[e].checked + this.dataList[e].checked = ck ? false : true + }, + changeST() { + if (this.searchType == '鐗╂枡') this.searchType = '璁㈠崟' + else this.searchType = '鐗╂枡' + }, + getMatList() { + let that = this + let searchParam = {} + if (this.searchType == '鐗╂枡') searchParam = {matnr: that.searchValue} + else searchParam = {orderNo: that.searchValue} + uni.request({ + url: that.baseUrl + '/orderDetl/forOrderNo/mergePakin/v1', + header: { + 'token': uni.getStorageSync('token') + }, + data: searchParam, + method: 'GET', + success(res) { + res = res.data; + if (res.code === 200) { + that.total = res.data.length + const result1 = res.data.filter(obj1 => + !that.selectedList.some(obj2 => obj1.matnr === obj2.matnr && obj1.orderNo === obj2.orderNo) + ); + that.dataList = result1 + that.total = result1.length + } else if (res.code == 403) { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); + } else { + uni.showToast({ title: res.msg, icon: "error", position: 'center' }) + } + } + }) + + }, + addItem(mat) { + this.getOpenerEventChannel().emit('sMat', {data: mat}); + uni.navigateBack({ + + }) + } + } + } +</script> + +<style> + @import url('../../static/css/wms.css/wms.css'); + .code { + background-color: #d9d9d9; + z-index: 99; + position: sticky; + top: 0rpx; + left: 0; + } + .code-title { + display: flex; + } + .order__list { + margin: 20rpx; + font-size: 14px; + background-color: #fff; + border-radius: 20rpx; + border: 1px solid #eeeeee; + display: flex; + position: relative; + background-color: #3eb689; + color: #FFF; + } + .order__list__left { + flex: 1; + padding: 20rpx; + position: relative; + } + .order__list__right { + width: 70rpx; + border-left: 1px solid #eeeeee; + display: flex; + align-items: center; + justify-content: center; + } +</style> diff --git a/static/css/wms.css/wms.css b/static/css/wms.css/wms.css index 57e65af..a461648 100644 --- a/static/css/wms.css/wms.css +++ b/static/css/wms.css/wms.css @@ -35,7 +35,7 @@ min-height: 40rpx; display: flex; align-items: center; - width: 30%; + width: 70%; } .left-item { display: flex; -- Gitblit v1.9.1