From 6344e1496d14f899b9af222ec60eb6646c5e3d1f Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 31 七月 2024 08:39:17 +0800 Subject: [PATCH] # --- /dev/null | 117 ----------------------- pages.json | 127 ------------------------- 2 files changed, 0 insertions(+), 244 deletions(-) diff --git a/pages.json b/pages.json index 534f1d8..9c27e08 100644 --- a/pages.json +++ b/pages.json @@ -61,72 +61,6 @@ } }, { - "path": "pages/tzsk/AGV/AGVPakin", - "style": { - "navigationBarTitleText": "绌烘澘鍏ュ簱" - } - }, - { - "path": "pages/tzsk/AGV/AGVPakinBing", - "style": { - "navigationBarTitleText": "AGV涓婃灦缁戝畾" - } - }, - { - "path": "pages/tzsk/AGV/AGVPakinOn", - "style": { - "navigationBarTitleText": "AGV涓婃灦缁勬墭" - } - }, - { - "path": "pages/tzsk/AGV/AGVStart", - "style": { - "navigationBarTitleText": "AGV鍚姩鍏ュ簱" - } - }, - { - "path": "pages/tzsk/AGV/AGVPick", - "style": { - "navigationBarTitleText": "閲囪喘鍏ュ簱" - } - }, - { - "path": "pages/tzsk/pakin/pakin", - "style": { - "navigationBarTitleText": "缁勬墭鍏ュ簱" - } - }, - { - "path": "pages/tzsk/pakin/pakin2", - "style": { - "navigationBarTitleText": "缁勬墭鍏ュ簱" - } - }, - { - "path": "pages/tzsk/pakin/pakin3", - "style": { - "navigationBarTitleText": "缁勬墭鍏ュ簱" - } - }, - { - "path": "pages/tzsk/order/orderPutOn", - "style": { - "navigationBarTitleText": "缁勬墭涓婃灦" - } - }, - { - "path": "pages/tzsk/order/orderPick", - "style": { - "navigationBarTitleText": "璁㈠崟鎷h揣" - } - }, - { - "path": "pages/tzsk/pakin/locChage", - "style": { - "navigationBarTitleText": "骞充粨绉诲簱" - } - }, - { "path": "pages/order/orderPakin", "style": { "navigationBarTitleText": "璁㈠崟鍏ュ簱" @@ -217,51 +151,6 @@ "style": { "navigationBarTitleText": "閫�鍑虹櫥褰�" } - } - ,{ - "path" : "pages/tzsk/AGV/AGVContainerMove", - "style" : - { - "navigationBarTitleText": "AGV瀹瑰櫒绂诲満", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/tzsk/pakin/untie", - "style" : - { - "navigationBarTitleText": "鎵樼洏瑙g粦", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/tzsk/pakin/locPick", - "style" : - { - "navigationBarTitleText": "骞冲簱鎷h揣", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/tzsk/pakin/checkOut", - "style" : - { - "navigationBarTitleText": "鍑哄簱鎷i��", - "enablePullDownRefresh": false - } - - } - ,{ - "path" : "pages/tzsk/AGV/AGVCode", - "style" : - { - "navigationBarTitleText": "AGV鏉$爜", - "enablePullDownRefresh": false - } - } ,{ "path" : "pages/phps/stock/changePallet", @@ -388,14 +277,6 @@ } }, { - "path" : "pages/tzsk/pakin/goodsUp", - "style" : - { - "navigationBarTitleText" : "骞冲簱鏃犳墭涓婃灦", - "enablePullDownRefresh" : false - } - }, - { "path" : "pages/home/testView", "style" : { @@ -416,14 +297,6 @@ "style" : { "navigationBarTitleText" : "璁㈠崟鍒楄〃", - "enablePullDownRefresh" : false - } - }, - { - "path" : "pages/tzsk/work/wrkMast", - "style" : - { - "navigationBarTitleText" : "宸ヤ綔妗f煡璇�", "enablePullDownRefresh" : false } }, diff --git a/pages/tzsk/AGV/AGVCode.vue b/pages/tzsk/AGV/AGVCode.vue deleted file mode 100644 index df36c3a..0000000 --- a/pages/tzsk/AGV/AGVCode.vue +++ /dev/null @@ -1,700 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">鏂欑鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="suppcode" :focus="suppcodeFocus" - @input="suppcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">绔欑偣:</view> - <uni-combox :candidates="floorList" placeholder="璇烽�夋嫨妤煎彿" v-model="floor" @input="getFloor"></uni-combox> - </view> - - </view> - - <!-- <view class="mat-list-title"> - <view style="-webkit-flex: 1;flex: 1;"></view> - <view style="-webkit-flex: 1;flex: 1;">绔欑偣鍒楄〃</view> - <view style="-webkit-flex: 1;flex: 1;"> - <button size="mini" @click="selectAll()">{{btnText}}</button> - </view> - </view> --> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i" :class="'bg-'+item.color"> - <view class="aside"> - <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> - </view> - <view class="list-left" style="display: flex;justify-content: center;"> - {{item.devNo}} - </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> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="AGVstart()">AGV鍚姩鍏ュ簱</button> - <!-- <button size="mini" type="primary" @click="containerPick()">鐩樼偣 / 鎷h揣</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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - suppcode: '', - suppcodeFocus: true, - barcode: '', - stationCode: '', - stationCodeFocus: true, - dataList: [ - // {matnr:'12321321',devNo:'rk123123',color:'red'}, - // {matnr:'12321321',devNo:'rk123123',color:'white'}, - ], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - floorList: [], - floor: "", - devNo: [], - btnText: '鍏ㄩ��', - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - this.getFloor() - }, - methods: { - AGVstart() { - let _this = this - let param = { - containerCode: this.suppcode, - devNo: this.floor, - } - uni.request({ - url: `${_this.baseUrl}/rpc/start`, - data: param, - method: 'POST', - success(res) { - res = res.data - if (res.code === 200) { - _this.suppcodeFocus = false - setTimeout(() => { - _this.suppcode = '' - _this.suppcodeFocus = true - }, 20) - _this.floor = '' - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - containerPick() { - let _this = this - for (var i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].checked) { - this.devNo.push(this.dataList[i].devNo) - } - } - uni.request({ - url: _this.baseUrl + '/agv/basDevp/visualized/container/pickIn', - header: {'token': uni.getStorageSync('token')}, - data: JSON.stringify({devNo: _this.devNo}), - method: 'POST', - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - _this.pickCode = '' - _this.dataList = [] - _this.devNo = [] - _this.messageText = "鐩樼偣 / 鎷h揣鎴愬姛" - _this.messageToggle('success') - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - suppcodeInput() { - if (this.suppcode.split('_')[1]) { - this.suppcode = this.suppcode.split('_')[1] - } - setTimeout(() => { - var len = this.suppcode.length - if (len != 10) { - this.suppcode = '' - this.suppcodeFocus = true - uni.showToast({ - title: '鏆傚瓨鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; - } - // this.pushDevNo() - // this.stationCodeFocuss() - }, 200) - }, - pushDevNo() { - var devNo = {"devNo":this.stationCode} - if (this.dataList.length == 0) { - this.dataList.push(devNo) - return - } - var flag = false - for(var i = 0; i < this.dataList.length; i++ ) { - if (this.dataList[i].devNo == devNo.devNo) { - this.messageText = "绔欑偣閲嶅" - this.messageToggle('warn') - return - } else { - flag = true - } - } - if(flag) { - this.dataList.push(devNo) - } - - }, - stationCodeFocuss() { - let that = this; - this.stationCode = '' - that.stationCodeFocus = false; - setTimeout(() => { - that.stationCodeFocus = true; - }, 100); - }, - getChecked() { - var checkedList = [] - for(var i = 0; i < this.dataList.length; i++) { - var t = !this.dataList[i].checked - if (this.dataList[i].checked) { - checkedList.push(this.dataList[i]) - } - } - this.dataList = checkedList - }, - set(i) { - var ck = this.dataList[i].checked - this.dataList[i].checked = ck ? false:true - - }, - selectAll() { - if (this.btnText == '鍏ㄩ��') { - for (let i in this.dataList) { - this.$set(this.dataList[i],'checked',true) - this.btnText = '鍙栨秷' - } - } else { - for (let i in this.dataList) { - var ck = this.dataList[i].checked - this.dataList[i].checked = false - this.btnText = '鍏ㄩ��' - } - } - - }, - getFloor() { - let that = this - that.floorList = [] - uni.request({ - url: that.baseUrl + '/agvMobile/getBasDevp/noCacheShelves/auth', - header: { 'token': uni.getStorageSync('token') }, - method: 'POST', - success(res) { - res = res.data - if (res.code === 200 && res.data) { - for (let k of res.data) { - that.floorList.push(k.devNo) - } - } - } - }); - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪鍚姩!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - this.devNo = [] - uni.vibrateShort(); - let that = this; - for (var i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].checked) { - this.devNo.push(this.dataList[i].devNo) - } - } - uni.request({ - url: that.baseUrl + '/agvMobile/pakin/auth', - data: JSON.stringify({ - devNo: that.devNo - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "鍚姩鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.stationCode = '' - this.floor = '' - this.suppcode = '', - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.floor = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .keyboard{ - width: 40px;height: 40px;background-size: 100%;position: absolute;z-index: 99; - top: 5px;right: 5px; border-radius: 50%; - display: flex;align-items: center;justify-content: center; - } - .kb-bgtr { - background-color: #55557f; - } - .kb-bgfa { - background-color: #00aeec; - } - - .bg-red { - background-color: #e54d42; - color: #ffffff; - } - .bg-white { - background-color: #ffffff; - color: #666666; - } - .list:first-child { - margin-top: 320rpx; - } - .aside { - width: 100rpx; - /* background-color: #303133; */ - display: flex; - align-items: center; - justify-content: center; - } - .code { - width: 100%; - position: fixed; - min-height: 100rpx; - 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; - height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> diff --git a/pages/tzsk/AGV/AGVContainerMove.vue b/pages/tzsk/AGV/AGVContainerMove.vue deleted file mode 100644 index 1339b7b..0000000 --- a/pages/tzsk/AGV/AGVContainerMove.vue +++ /dev/null @@ -1,613 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">妤煎彿:</view> - <uni-combox :candidates="floorList" placeholder="璇烽�夋嫨妤煎彿" v-model="floor" @input="getFloor"></uni-combox> - </view> - <view class="item"> - <view class="code-decs">鏆傚瓨浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus" - @input="stationCodeInput()"> - </view> - </view> - - <view class="mat-list-title"> - <view style="-webkit-flex: 1;flex: 1;"></view> - <view style="-webkit-flex: 1;flex: 1;">绔欑偣鍒楄〃</view> - <view style="-webkit-flex: 1;flex: 1;"><button size="mini" @click="selectAll()">{{btnText}}</button></view> - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i" :class="'bg-'+item.color"> - <view class="aside"> - <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> - </view> - <view class="list-left" style="display: flex;justify-content: center;"> - {{item.devNo}} - </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> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="combConfirm()">瀹瑰櫒绂诲満</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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - pickCode: '', - stationCode: '', - stationCodeFocus: true, - dataList: [ - // {matnr:'12321321',devNo:'rk123123',color:'red'}, - // {matnr:'12321321',devNo:'rk123123',color:'white'}, - ], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - floorList: [1,3], - floor: "", - devNo: [], - btnText: '鍏ㄩ��', - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - stationCodeInput() { - setTimeout(() => { - var len = this.stationCode.length - if (len != 15) { - this.stationCode = '' - this.stationCodeFocus = true - uni.showToast({ - title: '鏆傚瓨鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; - } - this.pushDevNo() - this.stationCodeFocuss() - }, 200) - }, - pushDevNo() { - var devNo = {"devNo":this.stationCode} - if (this.dataList.length == 0) { - this.dataList.push(devNo) - return - } - var flag = false - for(var i = 0; i < this.dataList.length; i++ ) { - if (this.dataList[i].devNo == devNo.devNo) { - this.messageText = "绔欑偣閲嶅" - this.messageToggle('warn') - return - } else { - flag = true - } - } - if(flag) { - this.dataList.push(devNo) - } - - }, - stationCodeFocuss() { - let that = this; - this.stationCode = '' - that.stationCodeFocus = false; - setTimeout(() => { - that.stationCodeFocus = true; - }, 100); - }, - getChecked() { - var checkedList = [] - for(var i = 0; i < this.dataList.length; i++) { - var t = !this.dataList[i].checked - if (this.dataList[i].checked) { - checkedList.push(this.dataList[i]) - } - } - this.dataList = checkedList - }, - set(i) { - var ck = this.dataList[i].checked - this.dataList[i].checked = ck ? false:true - - }, - selectAll() { - if (this.btnText == '鍏ㄩ��') { - for (let i in this.dataList) { - this.$set(this.dataList[i],'checked',true) - this.btnText = '鍙栨秷' - } - } else { - for (let i in this.dataList) { - var ck = this.dataList[i].checked - this.dataList[i].checked = false - this.btnText = '鍏ㄩ��' - } - } - - }, - getFloor() { - let that = this - if (this.floor == '') { - return - } - uni.request({ - url: that.baseUrl + '/agvMobile/getBasDevp/auth', - data: { - floor: that.floor - }, - header: { - 'token': uni.getStorageSync('token') - }, - method: 'POST', - success(res) { - res = res.data - for(var i = 0; i < res.data.length; i++) { - if (res.data[i].locSts === 'F') { - // res.data[i]["color"] = "red" - that.dataList.push(res.data[i]) - } - } - } - }); - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪绂诲満!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - let _this = this - var param = {'devNo' : _this.pickCode} - uni.request({ - url: _this.baseUrl + '/agv/basDevp/visualized/container/moveOut', - header: {'token': uni.getStorageSync('token')}, - data: JSON.stringify(param), - method: 'POST', - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - _this.pickCode = '' - _this.messageText = "绂诲満鎴愬姛" - _this.messageToggle('success') - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.stationCode = '' - this.floor = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.floor = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('@/static/css/wms.css/wms.css'); - - - .bg-red { - background-color: #e54d42; - color: #ffffff; - } - .bg-white { - background-color: #ffffff; - color: #666666; - } - .list:first-child { - margin-top: 320rpx; - } - .aside { - width: 100rpx; - /* background-color: #303133; */ - display: flex; - align-items: center; - justify-content: center; - } - .code { - width: 100%; - position: fixed; - min-height: 100rpx; - 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; - height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> diff --git a/pages/tzsk/AGV/AGVPakin.vue b/pages/tzsk/AGV/AGVPakin.vue deleted file mode 100644 index b6b4789..0000000 --- a/pages/tzsk/AGV/AGVPakin.vue +++ /dev/null @@ -1,628 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <input type="text" placeholder=" 鎵爜 / 杈撳叆 绔欑偣鐮�" v-model="orderNo" :focus="orderNoFocus" - @input="findOrder()"> - </view> - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">绔欑偣鍙凤細</view> - <view class="left-item"> - <uni-tag :text="item.barcode" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">绔欑偣鐘舵�侊細</view> - <view class="left-item">{{item.sts}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </view> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom-k"> - <button size="mini" type="primary" @click="combConfirm('warn')">绌烘澘鍑哄簱</button> - <button size="mini" type="primary" @click="combConfirm('warn')">绌烘澘鍏ュ簱</button> - <button size="mini" @click="reset('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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - dataList: [ - { - barcode: 'CS-101-001-01@1', - sts: 'F.鍦ㄥ簱' - } - ], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - orderNoFocus: true, - barcodeFocus: false, - matFocus: false, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯� - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - that.orderNoFocus = false - setTimeout(() => { - that.barcodeFocus = true - }, 10); - } else { - // uni.showToast({ - // title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - // icon: "none", - // position: 'top' - // }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - orderNoInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.orderNo.length - this.barcodeFocuss() - }, 200) - }, - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - if (this.barcode.split('_')[1]) { - this.barcode = this.barcode.split('_')[1] - } - // this.barcode = this.barcode.split('_')[1] - setTimeout(() => { - let len = this.barcode.length - if (len != 10) { - uni.showToast({ - title: '鏂欑鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - // 鍒ゆ柇鐗╂枡闀垮害鏄惁涓�1 - // if (that.dataList.length >= 1) { - // this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�" - // this.messageToggle('warn') - // that.matnr = '' - // return - // } - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { matnr: that.matnr }, - header: { 'token': uni.getStorageSync('token') }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data, - // tempOrderInfo: that.tempOrderInfo - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - data.data['csocode'] = '' - data.data['isoseq'] = '' - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪绌烘澘鍏ュ簱!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - this.messageToggle('error') - return; - } - // if (that.dataList.length > 1) { - // this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�" - // 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; - } - } - console.log(that.dataList); - console.log(that.barcode); - console.log(that.orderNo); - // return - uni.request({ - url: that.baseUrl + '/agvMobile/comb/auth', - data: JSON.stringify({ - orderNo: that.orderNo, - barcode: that.barcode, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.dataList = [] - that.findOrder() - // that.resst(); - that.barcode = '' - that.messageText = "绌烘澘鍏ュ簱鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .keyboard{ - width: 40px;height: 40px;background-size: 100%;position: absolute;z-index: 99; - top: 5px;right: 5px; border-radius: 50%; - display: flex;align-items: center;justify-content: center; - } - .kb-bgtr { - background-color: #55557f; - } - .kb-bgfa { - background-color: #00aeec; - } - - .list:first-child { - margin-top: 120rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 70rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 210rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } - .buttom-k { - position: fixed; - bottom: 0; - left: 0; - width: 100%; - display: flex; - flex-direction: column; - background-color: #FFF; - box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2) ; - } - .buttom-k button { - margin: 20rpx 50rpx; - } -</style> diff --git a/pages/tzsk/AGV/AGVPakinBing.vue b/pages/tzsk/AGV/AGVPakinBing.vue deleted file mode 100644 index b81b91c..0000000 --- a/pages/tzsk/AGV/AGVPakinBing.vue +++ /dev/null @@ -1,549 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">鏂欑鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()" readonly> - </view> - <view class="item"> - <view class="code-decs">鏆傚瓨浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus" - @input="stationCodeInput()" readonly> - <view class="item-right"> - <button></button> - <!-- <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> --> - <!-- <uni-icons type="right" color="#c1c1c1"></uni-icons> --> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - stationCode: '', - stationCodeFocus: false, - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - stationCodeInput() { - setTimeout(() => { - var len = this.stationCode.length - if (len != 7) { - this.stationCode = '' - this.stationCodeFocus = true - uni.showToast({ - title: '鏆傚瓨鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; - } - this.focuss() - }, 200) - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 6) { - uni.showToast({ - title: '鏂欑鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.stationCodeFocuss() - }, 200) - }, - // 鏆傚瓨浣嶆湁璇噸缃� - stationCodeFocuss() { - let that = this; - that.stationCodeFocus = false; - setTimeout(() => { - that.stationCodeFocus = true; - }, 100); - }, - // 鏂欑鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁戝畾!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - uni.request({ - url: that.baseUrl + '/agvMobile/combBinging/auth', - data: JSON.stringify({ - barcode: that.barcode, - stationCode: that.stationCode - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "缁戝畾鎴愬姛" - that.messageToggle('success') - // const innerAudioContext = uni.createInnerAudioContext(); - // innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .list:first-child { - margin-top: 280rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 140rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 140rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> diff --git a/pages/tzsk/AGV/AGVPakinOn.vue b/pages/tzsk/AGV/AGVPakinOn.vue deleted file mode 100644 index f244269..0000000 --- a/pages/tzsk/AGV/AGVPakinOn.vue +++ /dev/null @@ -1,732 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus" - @input="findOrder()"> - </view> - <view class="item"> - <view class="code-decs">鏂欑鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鏆傚瓨浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus" - @input="stationCodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鐗╂枡鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> - <view class="item-right"> - <button></button> - <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> - <uni-icons type="right" color="#c1c1c1"></uni-icons> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <!-- <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <input type="text" v-model="item.containerCode"> - <uni-tag :text="item.containerCode" type="primary"></uni-tag> - </view> - </view> --> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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">{{item.anfme}}</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> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="agvStart('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="matnr" 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" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :step='0.01' :max="9999999" 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(1)" @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="agvStartConfirm" type="dialog"> - <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content" - @confirm="agvStartConfirm" @close="resetClose"></uni-popup-dialog> - </uni-popup> - </view> - - <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - stationCode: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: false, - stationCodeFocus: false, - matFocus: false, - orderNoFocus: true, - matData: '', - removeNum: 0, - devNo: [], - flag: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - that.orderNoFocus = false - setTimeout(() => { - that.barcodeFocus = true - }, 10); - } else { - uni.showToast({ - title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - icon: "none", - position: 'top' - }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - stationCodeInput() { - setTimeout(() => { - var len = this.stationCode.length - if (len != 15) { - this.stationCode = '' - this.stationCodeFocus = true - uni.showToast({ - title: '鏆傚瓨鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; - } - this.focuss() - }, 200) - }, - // 绗﹀悎鏉′欢鐨勮烦杞埌涓嬩竴鏍忕洰 - orderNoInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.orderNo.length - this.barcodeFocuss() - }, 200) - }, - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - if (this.barcode.split('_')[1]) { - this.barcode = this.barcode.split('_')[1] - } - setTimeout(() => { - var len = this.barcode.length - if (len != 10) { - this.barcode = '' - this.barcodeFocus = true - uni.showToast({ - title: '鏂欑鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; - } - this.stationCodeFocuss() - }, 200) - }, - // 鏂欑鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鏆傚瓨浣嶆湁璇噸缃� - stationCodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.stationCodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - // if (that.dataList.length >= 1) { - // this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�" - // this.messageToggle('warn') - // that.matnr = '' - // return - // } - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - data.data['csocode'] = '' - data.data['isoseq'] = '' - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - if (this.dataList.length < 1) { - return - } - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb(e) { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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; - } - } - // console.log(that.dataList); - // return - uni.request({ - url: that.baseUrl + '/agvMobile/comb/auth', - data: JSON.stringify({ - orderNo: that.orderNo, - barcode: that.barcode, - locno: that.stationCode, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.flag = 1 - if (e == 1) { - that.resst(); - that.messageText = "缁勬墭鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - that.flag = 0 - } else { - that.messageText = res.msg - that.messageToggle('error') - that.flag = 0 - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.barcodeFocus = true - }, - // 鍚姩鍏ュ簱 - agvStart(type) { - if (this.dataList.length < 1) { - return - } - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪鍚姩鍏ュ簱!' - this.$refs.agvStartConfirm.open() - }, - agvStartConfirm() { - uni.showLoading() - this.devNo = [] - this.devNo.push(this.stationCode) - this.comb(2) - setTimeout(()=>{ - if (this.flag != 1) { - uni.hideLoading() - return - } - this.start() - uni.hideLoading() - },500) - - }, - start() { - let that = this - uni.request({ - url: that.baseUrl + '/agvMobile/pakin/auth', - data: JSON.stringify({ - devNo: that.devNo - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "鍚姩鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - .list:first-child { - margin-top: 400rpx; - } - - .code { - width: 100%; - position: fixed; - min-height: 210rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 280rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> diff --git "a/pages/tzsk/AGV/AGVPick - \345\211\257\346\234\254.vue" "b/pages/tzsk/AGV/AGVPick - \345\211\257\346\234\254.vue" deleted file mode 100644 index f8019ee..0000000 --- "a/pages/tzsk/AGV/AGVPick - \345\211\257\346\234\254.vue" +++ /dev/null @@ -1,573 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">鏆傚瓨浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="pickCode" :focus="pickCodeFocus" - @input="pickCodeFn" - /> - </view> - </view> - <view style="width: 100vw;height: 90vh;display: flex; align-items: center;justify-content: center;"> - <view style="height: 50vh;width: 80vw;"> - <button size="default" type="primary" @click="containerMove()" style="margin-top: 100rpx;">瀹瑰櫒绂诲満</button> - <button size="default" type="primary" @click="containerPick()" style="margin-top: 100rpx;">鐩樼偣 / 鎷h揣</button> - </view> - </view> - <!-- <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> --> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{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> - <view class="list-left-item"> - <view class="desc">绠卞彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.containerCode" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟锛�</view> - <view class="left-item"> - <uni-tag :text="item.csocode" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">琛屽彿锛�</view> - <view class="left-item">{{item.isoseq}}</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> - <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">鏁伴噺锛�</view> - <view class="left-item">{{item.anfme}}</view> - </view> - <view class="list-left-item"> - <view class="desc">搴撲綅鍙凤細</view> - <view class="left-item">{{item.locNo}}</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> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <!-- <button size="mini" type="primary" @click="combConfirm('warn')">鎷h揣</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='0.01' :max="9999999" 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> - <!-- 纭鎷h揣 --> - <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: '', - order: '', - barcode: '', - pickCode: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - matnr1: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - pickCodeFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - pickData: '', - - } - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - // 瀹瑰櫒绂诲満 - containerMove() { - let _this = this - var param = {'devNo' : _this.pickCode} - uni.request({ - url: _this.baseUrl + '/agv/basDevp/visualized/container/moveOut', - header: {'token': uni.getStorageSync('token')}, - data: JSON.stringify(param), - method: 'POST', - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - _this.pickCode = '' - _this.messageText = "绂诲満鎴愬姛" - _this.messageToggle('success') - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - containerPick() { - let _this = this - var param = {'devNo' : _this.pickCode} - uni.request({ - url: _this.baseUrl + '/agv/basDevp/visualized/container/pickIn', - header: {'token': uni.getStorageSync('token')}, - data: JSON.stringify(param), - method: 'POST', - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - _this.pickCode = '' - _this.messageText = "鐩樼偣 / 鎷h揣鎴愬姛" - _this.messageToggle('success') - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - pickCodeFn() { - let _this = this - let pickCode = _this.pickCode.split(';') - let orderMat = {} - orderMat['orderNo'] = pickCode[0] - orderMat['matnr'] = pickCode[1] - orderMat['matxr'] = pickCode[2] - orderMat['anfme'] = pickCode[3] - orderMat['locNo'] = pickCode[4] - orderMat['containerCode'] = pickCode[5] - orderMat['csocode'] = pickCode[6] - orderMat['isoseq'] = pickCode[7] - orderMat['wrkNo'] = pickCode[8] - _this.dataList.push(orderMat) - _this.pickData = orderMat - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - var matnr = that.matnr.split(";") - that.order = matnr[0] - that.matnr = matnr[1] - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - // if (matnr[2] === null) { - // matnr[2] = '' - // } - result.data.batch = matnr[2] - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - checkMat(mat) { - mat['orderNo'] = this.order - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.orderNo != this.dataList[i].orderNo) { - add = true - break; - } else { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - - } - if (add) { - this.dataList.unshift(mat) - } - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪鎷h揣!' - this.$refs.combConfirm.open() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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 + '鎷h揣鏁伴噺涓嶈兘涓�0' - this.messageToggle('error') - return; - } - } - uni.request({ - url: that.baseUrl + '/mobile/node/pakout', - data: that.pickData, - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "鎷h揣鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.order = '' - this.barcode = '' - this.matnr = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr1 = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - 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.pickCode = '' - this.pickCodeFocus = false - setTimeout(()=>{ - this.pickCodeFocus = true - },20) - }, - 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: auto 20rpx; - border-radius: 20rpx; - box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2); - } - .list:first-child { - margin-top: 230rpx; - } - .list:last-child { - margin-bottom: 120rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 100rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> \ No newline at end of file diff --git a/pages/tzsk/AGV/AGVPick.vue b/pages/tzsk/AGV/AGVPick.vue deleted file mode 100644 index aa51314..0000000 --- a/pages/tzsk/AGV/AGVPick.vue +++ /dev/null @@ -1,646 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">閲囪喘鍗曞彿:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus" - @input="findOrder()"> - </view> - <view class="item"> - <view class="code-decs">鏂欑鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <!-- <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <input type="text" v-model="item.containerCode"> - <uni-tag :text="item.containerCode" type="primary"></uni-tag> - </view> - </view> --> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - orderNoFocus: true, - barcodeFocus: false, - matFocus: false, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯� - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - that.orderNoFocus = false - setTimeout(() => { - that.barcodeFocus = true - }, 10); - } else { - // uni.showToast({ - // title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - // icon: "none", - // position: 'top' - // }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - orderNoInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.orderNo.length - this.barcodeFocuss() - }, 200) - }, - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - if (this.barcode.split('_')[1]) { - this.barcode = this.barcode.split('_')[1] - } - // this.barcode = this.barcode.split('_')[1] - setTimeout(() => { - let len = this.barcode.length - if (len != 10) { - uni.showToast({ - title: '鏂欑鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - // 鍒ゆ柇鐗╂枡闀垮害鏄惁涓�1 - // if (that.dataList.length >= 1) { - // this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�" - // this.messageToggle('warn') - // that.matnr = '' - // return - // } - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { matnr: that.matnr }, - header: { 'token': uni.getStorageSync('token') }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data, - // tempOrderInfo: that.tempOrderInfo - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - data.data['csocode'] = '' - data.data['isoseq'] = '' - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - this.messageToggle('error') - return; - } - // if (that.dataList.length > 1) { - // this.messageText = "鍙兘娣诲姞涓�绉嶇墿鏂�" - // 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; - } - } - console.log(that.dataList); - console.log(that.barcode); - console.log(that.orderNo); - // return - uni.request({ - url: that.baseUrl + '/agvMobile/comb/auth', - data: JSON.stringify({ - orderNo: that.orderNo, - barcode: that.barcode, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.dataList = [] - that.findOrder() - // that.resst(); - that.barcode = '' - that.messageText = "缁勬墭鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .keyboard{ - width: 40px;height: 40px;background-size: 100%;position: absolute;z-index: 99; - top: 5px;right: 5px; border-radius: 50%; - display: flex;align-items: center;justify-content: center; - } - .kb-bgtr { - background-color: #55557f; - } - .kb-bgfa { - background-color: #00aeec; - } - - .list:first-child { - margin-top: 340rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 140rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - font-size: 18px; - color: #303133; - } - - .item-right { - margin-left: auto; - margin-right: 20rpx; - } - - .mat-list-title { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 140rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.5); - } -</style> diff --git a/pages/tzsk/AGV/AGVStart.vue b/pages/tzsk/AGV/AGVStart.vue deleted file mode 100644 index d94c8c1..0000000 --- a/pages/tzsk/AGV/AGVStart.vue +++ /dev/null @@ -1,619 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">妤煎彿:</view> - <uni-combox :candidates="floorList" placeholder="璇烽�夋嫨妤煎彿" v-model="floor" @input="getFloor"></uni-combox> - </view> - <view class="item"> - <view class="code-decs">鏆傚瓨浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="stationCode" :focus="stationCodeFocus" - @input="stationCodeInput()"> - </view> - </view> - - <view class="mat-list-title"> - <view style="-webkit-flex: 1;flex: 1;"></view> - <view style="-webkit-flex: 1;flex: 1;">绔欑偣鍒楄〃</view> - <view style="-webkit-flex: 1;flex: 1;"><button size="mini" @click="selectAll()">{{btnText}}</button></view> - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i" :class="'bg-'+item.color"> - <view class="aside"> - <checkbox :value="item.matnr" :checked="item.checked" @click="set(i)"/> - </view> - <view class="list-left" style="display: flex;justify-content: center;"> - {{item.devNo}} - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - stationCode: '', - stationCodeFocus: true, - dataList: [ - // {matnr:'aaa',devNo:'rk123123',color:'red'}, - ], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - floorList: [1,2,3], - floor: "", - devNo: [], - btnText: '鍏ㄩ��', - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - selectAll() { - if (this.btnText == '鍏ㄩ��') { - for (let i in this.dataList) { - this.$set(this.dataList[i],'checked',true) - this.btnText = '鍙栨秷' - } - } else { - for (let i in this.dataList) { - var ck = this.dataList[i].checked - this.dataList[i].checked = false - this.btnText = '鍏ㄩ��' - } - } - - }, - stationCodeInput() { - setTimeout(() => { - var len = this.stationCode.length - if (len != 15) { - this.stationCode = '' - this.stationCodeFocus = true - uni.showToast({ - title: '鏆傚瓨鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - return; - } - this.pushDevNo() - this.stationCodeFocuss() - }, 200) - }, - pushDevNo() { - var devNo = {"devNo":this.stationCode} - if (this.dataList.length == 0) { - this.dataList.push(devNo) - return - } - var flag = false - for(var i = 0; i < this.dataList.length; i++ ) { - if (this.dataList[i].devNo == devNo.devNo) { - this.messageText = "绔欑偣閲嶅" - this.messageToggle('warn') - return - } else { - flag = true - } - } - if(flag) { - this.dataList.push(devNo) - } - - }, - stationCodeFocuss() { - let that = this; - this.stationCode = '' - that.stationCodeFocus = false; - setTimeout(() => { - that.stationCodeFocus = true; - }, 100); - }, - getChecked() { - var checkedList = [] - for(var i = 0; i < this.dataList.length; i++) { - var t = !this.dataList[i].checked - if (this.dataList[i].checked) { - checkedList.push(this.dataList[i]) - } - } - this.dataList = checkedList - }, - set(e) { - var ck = this.dataList[e].checked - this.dataList[e].checked = ck ? false:true - }, - getFloor() { - let that = this - if (this.floor == '') { - return - } - uni.request({ - url: that.baseUrl + '/agvMobile/getBasDevp/auth', - data: { - floor: that.floor - }, - header: { - 'token': uni.getStorageSync('token') - }, - method: 'POST', - success(res) { - res = res.data - for(var i = 0; i < res.data.length; i++) { - if (res.data[i].locSts === 'F') { - // res.data[i]["color"] = "red" - that.dataList.push(res.data[i]) - } - } - } - }); - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪鍚姩!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - this.devNo = [] - uni.vibrateShort(); - let that = this; - let params = [] - for (var i = 0; i < this.dataList.length; i++) { - if (this.dataList[i].checked) { - this.devNo.push(this.dataList[i].devNo) - let param = { - devNo: this.dataList[i].devNo, - containerCode: this.dataList[i].barcode, - containerType: this.dataList[i].locType1, - } - params.push(param) - } - } - uni.request({ - url: that.baseUrl + '/agvMobile/pakin/empty/auth', - data: { - pad: params - }, - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "鍚姩鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.stationCode = '' - this.floor = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.stationCode = '' - this.floor = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .bg-red { - background-color: #e54d42; - color: #ffffff; - } - .bg-white { - background-color: #ffffff; - color: #666666; - } - .list:first-child { - margin-top: 320rpx; - } - .aside { - width: 100rpx; - /* background-color: #303133; */ - display: flex; - align-items: center; - justify-content: center; - } - .code { - width: 100%; - position: fixed; - min-height: 100rpx; - 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; - height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> diff --git a/pages/tzsk/order/orderPick.vue b/pages/tzsk/order/orderPick.vue deleted file mode 100644 index b4a3cd4..0000000 --- a/pages/tzsk/order/orderPick.vue +++ /dev/null @@ -1,521 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">鎷h揣鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="pickCode" :focus="pickCodeFocus" - @input="pickCodeFn" - /> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{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> - <view class="list-left-item"> - <view class="desc">绠卞彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.containerCode" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟锛�</view> - <view class="left-item"> - <uni-tag :text="item.csocode" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">琛屽彿锛�</view> - <view class="left-item">{{item.isoseq}}</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> - <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">鏁伴噺锛�</view> - <view class="left-item">{{item.anfme}}</view> - </view> - <view class="list-left-item"> - <view class="desc">搴撲綅鍙凤細</view> - <view class="left-item">{{item.locNo}}</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> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="combConfirm('warn')">鎷h揣</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='0.01' :max="9999999" 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> - <!-- 纭鎷h揣 --> - <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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data () { - return { - baseUrl: '', - token: '', - order: '', - barcode: '', - pickCode: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - matnr1: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - pickCodeFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - pickData: '', - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - pickCodeFn() { - let _this = this - let pickCode = _this.pickCode.split(';') - let orderMat = {} - orderMat['orderNo'] = pickCode[0] - orderMat['matnr'] = pickCode[1] - orderMat['matxr'] = pickCode[2] - orderMat['anfme'] = pickCode[3] - orderMat['locNo'] = pickCode[4] - orderMat['containerCode'] = pickCode[5] - orderMat['csocode'] = pickCode[6] - orderMat['isoseq'] = pickCode[7] - orderMat['wrkNo'] = pickCode[8] - _this.dataList.push(orderMat) - _this.pickData = orderMat - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - var matnr = that.matnr.split(";") - that.order = matnr[0] - that.matnr = matnr[1] - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - // if (matnr[2] === null) { - // matnr[2] = '' - // } - result.data.batch = matnr[2] - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - checkMat(mat) { - mat['orderNo'] = this.order - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.orderNo != this.dataList[i].orderNo) { - add = true - break; - } else { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - - } - if (add) { - this.dataList.unshift(mat) - } - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪鎷h揣!' - this.$refs.combConfirm.open() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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 + '鎷h揣鏁伴噺涓嶈兘涓�0' - this.messageToggle('error') - return; - } - } - uni.request({ - url: that.baseUrl + '/mobile/node/pakout', - data: that.pickData, - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "鎷h揣鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.order = '' - this.barcode = '' - this.matnr = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr1 = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - 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.pickCode = '' - this.pickCodeFocus = false - setTimeout(()=>{ - this.pickCodeFocus = true - },20) - }, - 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: auto 20rpx; - border-radius: 20rpx; - box-shadow: 0px 0px 30px 0px rgba(0,0,0,0.2); - } - .list:first-child { - margin-top: 200rpx; - } - .list:last-child { - margin-bottom: 120rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 70rpx; - background-color: #FFF; - z-index: 10; - } - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 70rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> \ No newline at end of file diff --git a/pages/tzsk/order/orderPutOn.vue b/pages/tzsk/order/orderPutOn.vue deleted file mode 100644 index 4eeea91..0000000 --- a/pages/tzsk/order/orderPutOn.vue +++ /dev/null @@ -1,524 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">搴撲綅鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo" :focus="locNoFocus"> - <button v-show="recommendLocs.length" size="mini" type="primary" @click="toggle('right')">鎺ㄨ崘</button> - </view> - <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" @input="recommendLoc()"> - <view class="item-right"> - <button></button> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{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> - <view class="list-left-item"> - <view class="desc">鏂欏彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.matnr" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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='0.01' :max="9999999" 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> - <!-- 鏅�氬脊绐� --> - <uni-popup ref="popup" background-color="#fff"> - <scroll-view scroll-y="true" class="popup-content" :class="{ 'popup-height': type === 'left' || type === 'right' }"> - <view class="recommend" v-for="item in recommendLocs" @click="chose(item)"> {{ item }}</view> - </scroll-view> - </uni-popup> - </view> - - <view class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data () { - return { - baseUrl: '', - token: '', - order: '', - barcode: '', - locNo: '', - barcodeFocus: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - matnr1: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: false, - locNoFocus: true, - matData: '', - removeNum: 0, - type: 'center', - recommendLocs: [], - hide: true, - hidebg: 'kb-bgtr' - } - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - this.recommendLoc() - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - chose(item) { - this.locNo = item - this.$refs.popup.close() - }, - toggle(type) { - this.type = type - // open 鏂规硶浼犲叆鍙傛暟 绛夊悓鍦� uni-popup 缁勪欢涓婄粦瀹� type灞炴�� - this.$refs.popup.open(type) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - matnrInput() { - setTimeout(() => { - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎺ㄨ崘搴撲綅 - recommendLoc() { - let that = this - that.recommendLocs = [] - uni.request({ - url: that.baseUrl + '/mobile/node/recommend/loc', - data: {zpallet: that.barcode}, - header: {'token': uni.getStorageSync('token')}, - method: 'POST', - success(res) { - console.log(res); - res = res.data - - // that.recommendLocs.push('DT-C-010202') - if (res.code == 200 && res.data) { - that.recommendLocs.push(res.msg) - that.dataList = res.data - } - } - - }) - }, - checkMat(mat) { - mat['orderNo'] = this.order - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.orderNo != this.dataList[i].orderNo) { - add = true - break; - } else { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - - } - if (add) { - this.dataList.unshift(mat) - } - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪涓婃灦!' - this.$refs.combConfirm.open() - }, - comb() { - uni.vibrateShort(); - let that = this; - // if (that.barcode === '') { - // this.messageText = "璇锋坊鍔犲簱浣嶇爜" - // this.messageToggle('error') - // return; - // } - // if (that.dataList.length === 0) { - // this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - // 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; - // } - // } - uni.request({ - url: that.baseUrl + '/mobile/node/puttway', - data: JSON.stringify({ - locNo: that.locNo, - zpallet: that.barcode - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "涓婃灦鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.order = '' - this.barcode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr1 = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - 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.barcode = '' - this.recommendLocs = [] - this.barcodeFocuss() - }, - combClose() { - this.$refs.combConfirm.close() - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - .popup-content { - /* height: 90vh; */ - height: 90vh; - width: 200px; - } - .recommend { - width: 300rpx; - height: 100rpx; - text-align: center; - line-height: 100rpx; - } - .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); - margin: 20rpx; - } - .list:first-child { - margin-top: 280rpx; - } - .list:last-child { - margin-bottom: 120rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 140rpx; - background-color: #FFF; - z-index: 10; - } - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 140rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> \ No newline at end of file diff --git a/pages/tzsk/pakin/checkOut.vue b/pages/tzsk/pakin/checkOut.vue deleted file mode 100644 index a97ac07..0000000 --- a/pages/tzsk/pakin/checkOut.vue +++ /dev/null @@ -1,525 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鎷h揣绠�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="pickCode" :focus="pickCodeFocus" - @input="pickCodeInput()"> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <!-- <input type="text" v-model="item.containerCode" @input="checkContainerCode(item)"> --> - <view class="left-item">{{item.containerCode}}</view> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <!-- <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - -- <uni-tag :text="item.containerCode" type="primary"></uni-tag> - </view> - </view> --> - <!-- <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - -- <uni-tag :text="item.containerCode" type="primary"></uni-tag> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> --> - <!-- <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="combConfirm('warn')">鎷i��</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="matnr" 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="containerCode"></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='0.01' :max="9999999" 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="add" type="dialog"> - <view class="popup"> - <!-- 鏍囬 --> - <view class="title">鎷h揣鏁伴噺</view> - <view class="popup-item"> - <view class="popup-item-left">鏂欑鐮�:</view> - <view class="popup-item-right"> - <input type="text" v-model="pickCode" 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" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" /> - </view> - </view> - <view class="btn"> - <view class="btn-left" @click="addClose">鍙栨秷</view> - <view class="btn-right" @click="addConfirm()">纭</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> - <!-- 纭鎷i�� --> - <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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - pickCode: '', - pickCodeFocus: false, - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr', - containerCode: '' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - // 杩囨护 - checkContainerCode(item) { - if (item.containerCode.split('_')[1]) { - item.containerCode = item.containerCode.split('_')[1] - } - // item.containerCode = item.containerCode.split('_')[1] - // this.barcode = this.barcode.split('_')[1] - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - let _this = this - uni.request({ - url: `${_this.baseUrl}/mobile/wrkdetl/auth`, - data: { barcode: _this.barcode }, - method: 'POST', - header: { 'token': uni.getStorageSync('token') }, - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - _this.messageText = "璇锋嫞閫�" - _this.messageToggle('success') - _this.barcodeFocus = false; - setTimeout(() => { - _this.pickCodeFocus = true; - }, 100); - } else { - _this.messageText = "鏆傛棤鎷f枡淇℃伅" - _this.messageToggle('warn') - _this.barcodeFocus = false; - setTimeout(() => { - _this.barcode = ''; - _this.barcodeFocus = true; - }, 100); - } - } - }) - }, - pickCodeInput() { - this.pickCode = this.pickCode.split('_')[1] ? this.pickCode.split('_')[1] : this.pickCode.split('_')[0] - for (let k of this.dataList) { - if (this.pickCode == k.containerCode) { - this.messageText = "鏉$爜閲嶅" - this.messageToggle('warn') - this.pickCodeFocus = false; - setTimeout(() => { - this.pickCode = '' - this.pickCodeFocus = true; - }, 100); - return - } - } - this.add() - }, - add() { - this.$refs.add.open() - }, - addConfirm() { - let data = {containerCode: this.pickCode,anfme: this.count} - this.dataList.push(data) - this.pickCodeFocus = false; - setTimeout(() => { - this.pickCode = '' - this.count = '' - this.pickCodeFocus = true; - }, 100); - - this.$refs.add.close() - }, - addClose() { - - this.pickCodeFocus = false; - setTimeout(() => { - this.pickCode = '' - this.count = '' - this.pickCodeFocus = true; - }, 100); - // this.pickCode = '' - this.$refs.add.close() - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.containerCode = this.dataList[i].containerCode - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].containerCode = this.containerCode - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪鎷i��!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - // return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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 + '鎷i�夋暟閲忎笉鑳戒负0' - this.messageToggle('error') - return; - } - } - // console.log(that.dataList); - // return - console.log(that.dataList); - uni.request({ - url: that.baseUrl + '/mobile/modify/wrkdetl/auth', - data: JSON.stringify({ - barcode: "80009991", - params: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "鎷i�夋垚鍔�" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.pickCode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.pickCode = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .list:first-child { - margin-top: 260rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 70rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 140rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); - } -</style> diff --git a/pages/tzsk/pakin/goodsUp.vue b/pages/tzsk/pakin/goodsUp.vue deleted file mode 100644 index 8e9ec7b..0000000 --- a/pages/tzsk/pakin/goodsUp.vue +++ /dev/null @@ -1,603 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">搴撲綅鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo" :focus="locNoFocus"> - </view> - <view class="item"> - <view class="code-decs">鐗╂枡鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> - <view class="item-right"> - <button></button> - <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> - <uni-icons type="right" color="#c1c1c1"></uni-icons> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <input type="text" v-model="item.containerCode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - locNo: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: false, - locNoFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - }, - // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯� - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - // that.tempOrderInfo.csocode = res.data[0].combMats.csocode ? res.data[0].combMats.csocode : '' - // that.tempOrderInfo.isoseq = res.data[0].combMats.isoseq ? res.data[0].combMats.isoseq : '' - } else { - uni.showToast({ - title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - icon: "none", - position: 'top' - }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪涓婃灦!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.locNo === '') { - this.messageText = "璇锋壂鎻忓簱浣嶇爜" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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; - } - } - uni.request({ - url: that.baseUrl + '/mobile/node/pakin/v1', - data: JSON.stringify({ - locno: that.locNo, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "涓婃灦鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.locNo = '' - this.barcode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.locNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .keyboard{ - width: 40px;height: 40px;background-size: 100%;position: absolute;z-index: 99; - top: 5px;right: 5px;background-color: #00aeec; border-radius: 50%; - display: flex;align-items: center;justify-content: center; - } - .list:first-child { - margin-top: 260rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 140rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 140rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); - } -</style> - diff --git a/pages/tzsk/pakin/locChage.vue b/pages/tzsk/pakin/locChage.vue deleted file mode 100644 index 8f768ab..0000000 --- a/pages/tzsk/pakin/locChage.vue +++ /dev/null @@ -1,576 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">婧愬簱浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="sourceLoc" :focus="sourceLocFocus" - @input="barcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鏂板簱浣�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="targetLoc" :focus="targetLocFocus" - @input="barcodeInput2()"> - <view class="item-right"> - <button></button> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{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> - <view class="list-left-item"> - <view class="desc">鏂欏彿锛�</view> - <view class="left-item"> - <uni-tag :text="item.matnr" type="primary"></uni-tag> - </view> - </view> - <view class="list-left-item"> - <view class="desc">鍚嶇О锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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">{{item.anfme}}</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> --> - </view> - </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" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :step='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data () { - return { - baseUrl: '', - token: '', - sourceLoc: '', - sourceLocFocus: true, - targetLoc: '', - targetLocFocus: false, - dataList: [], - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - removeNum: 0, - hide: true, - hidebg: 'kb-bgtr', - count: '', - weight: '', - matnr1: '' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - let that = this - that.dataList = [] - uni.request({ - url: `${that.baseUrl}/manLocDetl/list/auth`, - header: { 'token': uni.getStorageSync('token') }, - data: { loc_no: that.sourceLoc }, - success(res) { - res = res.data - console.log(res); - if (res.code === 200) { - if (res.data.records.length > 0) { - for (let k of res.data.records) { - console.log(k.status); - if (k.status != 1) { - that.messageText = '褰撳墠搴撲笉鍦ㄧ姸鎬�' - that.messageToggle('error') - that.dataList = [] - that.sourceLoc = '' - that.sourceLocRE() - break - } else { - that.dataList.push(k) - that.sourceLocFocus = false - that.targetLoc = '' - that.targetLocFocus = true - } - } - } else { - that.messageText = '褰撳墠搴撲綅鏆傛棤鏁版嵁' - that.messageToggle('error') - that.sourceLocRE() - } - - - } - } - - }) - }, - barcodeInput2() { - let that = this - uni.request({ - url: `${that.baseUrl}/manLocDetl/list/auth`, - header: { 'token': uni.getStorageSync('token') }, - data: { loc_no: that.targetLoc}, - success(res) { - res = res.data - if (res.code === 200) { - if (res.data.records != 0) { - that.messageText = '鏂板簱浣嶆湁璐�' - that.messageToggle('error') - that.targetLocRE() - } - } - } - - }) - }, - // 婧愬簱浣嶉噸缃� - sourceLocRE() { - this.sourceLocFocus = false - setTimeout(()=>{ - this.sourceLoc = '' - this.sourceLocFocus = true - },100) - }, - // 婧愬簱浣嶉噸缃� - targetLocRE() { - this.targetLocFocus = false - setTimeout(()=>{ - this.targetLoc = '' - this.targetLocFocus = true - },100) - }, - - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - var matnr = that.matnr.split(";") - that.order = matnr[0] - that.matnr = matnr[1] - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - result.data.batch = matnr[2] - uni.navigateTo({ - url: "../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - checkMat(mat) { - mat['orderNo'] = this.order - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.orderNo != this.dataList[i].orderNo) { - add = true - break; - } else { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - - } - if (add) { - this.dataList.unshift(mat) - } - }, - combConfirm(type) { - if (this.sourceLoc == '') { - this.messageText = '璇锋壂鎻�/娣诲姞婧愬簱浣�' - this.messageToggle('error') - return - } - if (this.targetLoc == '') { - this.messageText = '璇锋壂鎻�/娣诲姞杞Щ搴撲綅' - this.messageToggle('error') - return - } - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' - this.$refs.combConfirm.open() - }, - comb() { - let that = this; - uni.request({ - url: `${that.baseUrl}/node/move/start`, - data: {sourceLocNo: that.sourceLoc, - targetLocNo: that.targetLoc}, - header: { 'token': uni.getStorageSync('token') }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "绉诲簱鎴愬姛" - that.messageToggle('success') - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.order = '' - this.barcode = '' - this.sourceLoc = '' - this.targetLoc = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr1 = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - 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.sourceLoc = '' - this.targetLoc = '' - this.barcodeFocuss() - }, - 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: 320rpx; - } - .list:last-child { - margin-bottom: 120rpx; - } - .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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); - } -</style> \ No newline at end of file diff --git "a/pages/tzsk/pakin/locPick - \345\211\257\346\234\254.vue" "b/pages/tzsk/pakin/locPick - \345\211\257\346\234\254.vue" deleted file mode 100644 index 947daac..0000000 --- "a/pages/tzsk/pakin/locPick - \345\211\257\346\234\254.vue" +++ /dev/null @@ -1,65 +0,0 @@ -<template> - <view> - <view class="box" v-for="item in 10"> - <view class="box-left"> - <text class="text"> 搴撳尯 </text> - </view> - <view class="box-right"> - <text class="text"> {{item}} </text> - </view> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - - } - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - this.getNodeTree() - }, - methods: { - getNodeTree() { - let _this = this - uni.request({ - url: `${_this.baseUrl}/node/tree/auth`, - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - }) - } - } - } -</script> - -<style> - .box { - margin: 16rpx; - display: flex; - align-items: stretch; - - } - .box-left { - height: 80rpx; - line-height: 80rpx; - background-color: #499bff; - background-color: #26edcf; - color: #F7F6F9; - } - .box-right { - flex: 1; - display: flex; - align-items: center; - background-color: #fff; - color: #808080; - } - .text { - padding: 10rpx 20rpx; - } -</style> diff --git a/pages/tzsk/pakin/locPick.vue b/pages/tzsk/pakin/locPick.vue deleted file mode 100644 index ca7a86f..0000000 --- a/pages/tzsk/pakin/locPick.vue +++ /dev/null @@ -1,329 +0,0 @@ -<template> - <view> - <view class="container" v-for="(item,i) in tree" :key="i"> - <view :class="item.key"> - <view class="title" > - <view style="width: 50%;">{{item.title}}</view> - <view @click="switchbtn(item)"> - <uni-icons type="top" v-show="item.switch"></uni-icons> - <uni-icons type="bottom" v-show="!item.switch"></uni-icons> - </view> - </view> - <view class="name" v-show="item.key == 'user_id'" @click="back()"> - <view>{{item.title}}</view> - </view> - <view class="sub1" v-for="sub in item.children" style="margin-left: 1em;" v-show="item.switch"> - <view :class="sub.key" class="title sub-title" > - <view @click="chose(sub)">{{sub.title}}</view> - <view @click="switchbtn(sub)"> - <uni-icons type="top" v-show="sub.switch"></uni-icons> - <uni-icons type="bottom" v-show="!sub.switch"></uni-icons> - </view> - </view> - - <view :class="sub.key" class="name" v-show="sub.key == 'user_id'" @click="back()"> - <view>{{sub.title}}</view> - </view> - - <view class="sub2" v-for="it in sub.children" style="margin-left: 1em;" v-show="sub.switch"> - <!-- <view :class="it.key" class="title sub-title" >{{it.title}}</view> --> - <view :class="it.key" class="locarea name" @click="chose(it)"> - <view>{{it.title}}</view> - </view> - </view> - </view> - </view> - </view> - - <view class="pick-list" v-show="pickData != ''"> - <view class="list-item"> - <text class="list-title">璁㈠崟鍙凤細</text><text class="val-text">{{pickData.docNum ? pickData.docNum : '--'}}</text> - </view> - <view class="list-item"> - <text>搴撲綅鍙凤細</text><text>{{pickData.locNo}}</text> - </view> - <view class="list-item"> - <text>鎵樼洏鐮侊細</text><text>{{pickData.zpallet ? pickData.zpallet : '--'}}</text> - </view> - <view class="list-item"> - <text>鏂欑鐮侊細</text><text>{{pickData.containerCode ? pickData.containerCode : '--'}}</text> - </view> - <view class="list-item"> - <text>閿�鍞鍙凤細</text><text>{{pickData.csocode ? pickData.csocode : '--'}}</text> - </view> - <view class="list-item"> - <text>璁㈠崟琛屽彿锛�</text><text>{{pickData.isoseg ? pickData.isoseg : '--'}}</text> - </view> - <view class="list-item"> - <text>鐗╂枡鍙凤細</text><text>{{pickData.matnr ? pickData.matnr : '--'}}</text> - </view> - <view class="list-item"> - <text>鐗╂枡鍚嶇О锛�</text><text>{{pickData.maktx}}</text> - </view> - <view class="list-item"> - <text>鐘舵�侊細</text><text>{{pickData.status$}}</text> - </view> - <view class="list-item"> - <text>鏁伴噺锛�</text><text class="val-num">{{pickData.anfme}}</text> - </view> - </view> - - <view style="height: 100rpx;"></view> - - <view class="z-floor" v-show="pickData != ''"> - <button size="mini" type="primary" @click="picked()">鎷h揣</button> - </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 { - tree: [], - pickList: [], - pickData: '', - index: 1, - len: 5, - msgType1: 'success', - msgType: 'success', - messageText: '', - } - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - this.getNodeTree() - }, - methods: { - getNodeTree() { - let _this = this - uni.request({ - url: `${_this.baseUrl}/node/tree/auth`, - header: {'token': uni.getStorageSync('token')}, - method: 'POST', - success(res) { - this.tree = [] - res = res.data - // console.log(res.data[0].children); - if (res.data[0].children[0]) { - for (let k of res.data[0].children) { - // console.log(k); - if (k.children && k.children.length > 0) { - for (let i of k.children) { - i['switch'] = true - // console.log(i); - } - } - // console.log(k); - k['switch'] = true - _this.tree.push(k) - } - // console.log(_this.tree); - } else { - this.tree.push(res.data[0]) - } - } - }) - }, - async getUserTree() { - let res = await user.getUserTree() - if (res.code === 200) { - this.tree = [] - // console.log(res.data[0]); - if (res.data[0].children) { - for (let k of res.data[0].children) { - - if (k.children && k.children.length > 0) { - for (let i of k.children) { - i['switch'] = true - // console.log(i); - } - } - // console.log(k); - k['switch'] = true - this.tree.push(k) - } - } else { - this.tree.push(res.data[0]) - } - } else if (res.code === 403) { - this.backLogin(res) - } - console.log(this.tree); - }, - switchbtn(item) { - // console.log(item); - item.switch = item.switch ? false : true - }, - open(e) { - // console.log('open', e) - }, - close(e) { - // console.log('close', e) - }, - change(e) { - // console.log('change', e) - }, - backLogin(res) { - uni.showToast({title: res.msg, icon: "none", position: 'top'}) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - }, - back() { - uni.$emit('isRefresh', 1) - uni.navigateBack({ - - }) - }, - chose(data) { - let that = this - uni.request({ - url: `${that.baseUrl}/node/order/pakout`, - header: {'token': uni.getStorageSync('token')}, - data: {locType: data.title}, - success(res) { - // console.log(res); - res = res.data - if (res.code === 200 && res.data.length > 0) { - that.pickList = res.data - that.len = res.data.length - that.pickData = res.data[0] - that.index = 1 - } else if (res.data.length == 0) { - that.getNodeTree() - } - } - }) - this.tree = [] - }, - picked() { - let that = this - // console.log(that.len); - // console.log(that.index); - if (that.len < that.index) { - that.pickData = '' - that.index = 1 - that.getNodeTree() - return - } else { - that.pickData.orderNo = that.pickData.docNum - uni.request({ - url: `${that.baseUrl}/mobile/node/pakout`, - header: {'token': uni.getStorageSync('token')}, - data: that.pickData, - method: 'POST' - }).then((res)=>{ - res = res.data - // console.log(res); - if (res.code === 200) { - if (that.index == that.len) { - that.pickData = '' - that.index = 1 - that.getNodeTree() - } else { - that.index++ - that.pickData = that.pickList[that.index] - } - that.messageText = "鎷h揣鎴愬姛" - that.messageToggle('success') - } - }) - - } - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - - } - } -</script> - -<style> - .container { - margin: 16rpx; - min-height: 35rpx; - background-color: #FFF; - padding: 16rpx; - } - .box1 { - background-color: aqua; - } - .title { - box-shadow: -3px 0px 0px #55aaff; - padding-left: 5px; - font-size: 15px; - font-weight: 700; - display: flex; - justify-content: space-between; - align-items: center; - } - .sub-title { - margin: 32rpx 0; - box-shadow: -3px 0px 0px #55aa7f; - } - .name { - padding: 16rpx; - display: flex; - justify-content: space-between; - align-items: center; - } - .locarea:active { - background-color: #55aa7f; - } - .pick-list { - margin: 8px; - background-color: #FFF; - min-height: 70rpx; - border-radius: 20rpx; - } - .list-item { - min-height: 70rpx; - display: flex; - align-items: center; - padding-left: 32rpx; - } - .list-item:first-child { - padding-top: 8rpx; - } - .list-item:last-child { - padding-bottom: 8rpx; - } - .z-floor { - position: fixed; - bottom: 0; - left: 0; - height: 100rpx; - width: 100%; - background-color: #FFF; - display: flex; - align-items: center; - - } - .list-title { - vertical-align: text-bottom; - } - .val-text { - background-color: #00aeec; - padding: 2px 4px; - border-radius: 4px; - color: #FFF; - } - .val-num { - font-weight: 900; - color: #d19a66; - font-size: 16px; - } -</style> \ No newline at end of file diff --git a/pages/tzsk/pakin/pakin.vue b/pages/tzsk/pakin/pakin.vue deleted file mode 100644 index c4f84f4..0000000 --- a/pages/tzsk/pakin/pakin.vue +++ /dev/null @@ -1,610 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus" - @input="findOrder()"> - </view> - <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鐗╂枡鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> - <view class="item-right"> - <button></button> - <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> - <uni-icons type="right" color="#c1c1c1"></uni-icons> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <input type="text" v-model="item.containerCode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: false, - orderNoFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - }, - // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯� - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - // that.tempOrderInfo.csocode = res.data[0].combMats.csocode ? res.data[0].combMats.csocode : '' - // that.tempOrderInfo.isoseq = res.data[0].combMats.isoseq ? res.data[0].combMats.isoseq : '' - } else { - uni.showToast({ - title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - icon: "none", - position: 'top' - }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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; - } - } - // console.log(that.dataList); - // return - uni.request({ - url: that.baseUrl + '/mobile/comb/auth', - data: JSON.stringify({ - barcode: that.barcode, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "缁勬墭鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .keyboard{ - width: 40px;height: 40px;background-size: 100%;position: absolute;z-index: 99; - top: 5px;right: 5px;background-color: #00aeec; border-radius: 50%; - display: flex;align-items: center;justify-content: center; - } - .list:first-child { - margin-top: 360rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 210rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); - } -</style> diff --git a/pages/tzsk/pakin/pakin2.vue b/pages/tzsk/pakin/pakin2.vue deleted file mode 100644 index d3b2702..0000000 --- a/pages/tzsk/pakin/pakin2.vue +++ /dev/null @@ -1,621 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus" - @input="findOrder()"> - </view> - <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鐗╂枡鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> - <view class="item-right"> - <button></button> - <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> - <uni-icons type="right" color="#c1c1c1"></uni-icons> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <input type="text" v-model="item.containerCode" @input="checkContainerCode(item)"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: false, - orderNoFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - // 杩囨护 - checkContainerCode(item) { - item.containerCode = item.containerCode.split('_')[1] ? item.containerCode.split('_')[1] : item.containerCode - - // this.barcode = this.barcode.split('_')[1] - }, - // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯� - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - that.orderNoFocus = false - setTimeout(() => { - that.barcodeFocus = true - }, 10); - } else { - uni.showToast({ - title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - icon: "none", - position: 'top' - }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - that.dataList.push(data.data) - // that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - var len = this.dataList.length - var add = true ,sameItem = false - for (var i = 0; i < len; i++) { - if (mat.matnr == this.dataList[i].matnr) { - for (var j = 0; j < len; j++) { - if (mat.batch == this.dataList[j].batch) { - sameItem = true - } - } - // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - if (mat.batch != this.dataList[i].batch) { - this.$forceUpdate() // 寮哄埗鍒锋柊 - if (sameItem) { - add = false - } else { - add = true - } - - } else { - // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - this.dataList[i].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - add = false - } - } - } - if (add) { - this.dataList.unshift(mat) - } - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - // if (that.barcode === '') { - // this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - // this.messageToggle('error') - // return; - // } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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; - } - } - // console.log(that.dataList); - // return - uni.request({ - url: that.baseUrl + '/mobile/comb/auth', - data: JSON.stringify({ - barcode: that.barcode, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "缁勬墭鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .list:first-child { - margin-top: 320rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 210rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); - } -</style> diff --git a/pages/tzsk/pakin/pakin3.vue b/pages/tzsk/pakin/pakin3.vue deleted file mode 100644 index 36d11b6..0000000 --- a/pages/tzsk/pakin/pakin3.vue +++ /dev/null @@ -1,660 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">璁㈠崟鍙�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="orderNoFocus" - @input="findOrder()"> - </view> - <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - <view class="item"> - <view class="code-decs">鐗╂枡鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> - <view class="item-right"> - <button></button> - <text style="text-align: right;color: #409EFF;" @click="selectMat()">鎻愬彇+</text> - <uni-icons type="right" color="#c1c1c1"></uni-icons> - </view> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item"> - <input type="text" v-model="item.containerCode" @input="checkContainerCode(item)"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item"> - <input type="text" v-model="item.csocode"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item"> - <input type="text" v-model="item.isoseq"> - <!-- <uni-tag :text="item.containerCode" type="primary"></uni-tag> --> - </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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </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> - </view> - </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="matnr" 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='0.01' :max="9999999" 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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: false, - orderNoFocus: true, - matFocus: false, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - // 杩囨护 - checkContainerCode(item) { - item.containerCode = item.containerCode.split('_')[1] ? item.containerCode.split('_')[1] : item.containerCode - - - // this.barcode = this.barcode.split('_')[1] - }, - // 鏍规嵁璁㈠崟鍙疯繑鍥炲晢鍝佽鎯� - findOrder() { - let that = this - that.tempOrderInfo.csocode = '' - that.tempOrderInfo.isoseq = '' - uni.request({ - url: that.baseUrl + '/mobile/order/search/orderNo/auth', - header: {'token': uni.getStorageSync('token')}, - data: { - orderNo: that.orderNo - }, - success(res) { - res = res.data - if (res.code === 200) { - if(res.data && res.data[0].combMats) { - for (let i = 0; i < res.data[0].combMats.length; i++) { - that.checkMat(res.data[0].combMats[i]) - } - that.orderNoFocus = false - setTimeout(() => { - that.barcodeFocus = true - }, 10); - } else { - uni.showToast({ - title: that.orderNo + '璇锋鏌ヨ鍗曞彿鏄惁姝g‘', - icon: "none", - position: 'top' - }) - } - } else if (res.code == 403) { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: res.msg, - icon: "none", - position: 'top' - }) - } - } - }) - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - this.focuss() - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 鎼滅储鐗╂枡 - findMat() { - let that = this - uni.request({ - url: that.baseUrl + '/mat/auth', - data: { - matnr: that.matnr - }, - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - result = result.data - if (result.code === 200 && result.data) { - that.matData = result.data - that.matnr = '' - that.matData['batch'] = '' - uni.navigateTo({ - url: "../../mat/matSelected", - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� - success: function(res) { - res.eventChannel.emit('mat', { - data: result.data - }) - }, - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� - events: { - matList: function(data) { - // that.dataList.push(data.data) - that.checkMat(data.data) - that.focuss() - }, - }, - }); - } else if (result.code == 403) { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - uni.showToast({ - title: result.msg, - icon: "none", - position: 'top' - }) - } - - } - }); - - }, - selectMat() { - let that = this - uni.navigateTo({ - url: "../../mat/matQuery", - success: function(res) { - // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 - res.eventChannel.emit('commonUrl', { - commonUrl: '' - }) - }, - events: { - // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� - acceptDataFromOpenedPage: function(data) { - that.matnr = data.data - that.findMat(that.matnr) - }, - }, - - - }); - that.matnr = '' - }, - checkMat(mat) { - let num = 0; - let index = 0; - mat.containerCode = '' - mat.csocode = '' - mat.isoseq = '' - for (let i = 0; i < this.dataList.length; i++) { - if (mat.matnr == this.dataList[i].matnr) { - if (mat.batch == this.dataList[i].batch) { - index = i; - num++; - if (mat.containerCode != this.dataList[i].containerCode - || mat.csocode != this.dataList[i].csocode - || mat.isoseq != this.dataList[i].isoseq) { - num = 0; - } else { - num++; - break; - } - } - - } - } - if (num == 0) { - this.dataList.unshift(mat) - } else { - this.dataList[index].anfme += mat.anfme - this.$forceUpdate() // 寮哄埗鍒锋柊 - } - }, - // var len = this.dataList.length - // var add = true ,sameItem = false - // for (var i = 0; i < len; i++) { - // if (mat.matnr == this.dataList[i].matnr) { - // // for (var j = 0; j < len; j++) { - // // if (mat.batch == this.dataList[j].batch) { - // // sameItem = true - // // } - // // } - // // 鐩稿悓鐗╂枡 涓嶅悓鎵瑰彿 鏂板姞鍒楄〃 - - // if (mat.batch != this.dataList[i].batch) { - // this.$forceUpdate() // 寮哄埗鍒锋柊 - // if (sameItem) { - // add = false - // } else { - // add = true - // } - - // } else { - // // 鐩稿悓鐗╂枡鐩稿悓鎵瑰彿 鏁伴噺绱姞 - // console.log(mat.containerCode); - // console.log(this.dataList[i].containerCode); - // if (this.dataList[i].containerCode != mat.containerCode - // || this.dataList[i].csocode != mat.csocode - // || this.dataList[i].isoseq != mat.isoseq) { - // add = true - // } else { - // this.dataList[i].anfme += mat.anfme - // this.$forceUpdate() // 寮哄埗鍒锋柊 - // add = false - // } - - // } - // } - // } - // if (add) { - // this.dataList.unshift(mat) - // } - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - uni.vibrateShort(); - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" - 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; - } - } - // console.log(that.dataList); - // return - uni.request({ - url: that.baseUrl + '/mobile/comb/auth', - data: JSON.stringify({ - barcode: that.barcode, - combMats: that.dataList - }), - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "缁勬墭鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .list:first-child { - margin-top: 320rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 210rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 200rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); - } -</style> diff --git a/pages/tzsk/pakin/untie.vue b/pages/tzsk/pakin/untie.vue deleted file mode 100644 index 3a331a8..0000000 --- a/pages/tzsk/pakin/untie.vue +++ /dev/null @@ -1,416 +0,0 @@ -<template> - <view> - <view class="code"> - <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" - @input="barcodeInput()"> - </view> - </view> - <view class="mat-list-title"> - 鍟嗗搧鍒楄〃 - </view> - <scroll-view> - <view class="list" v-for="(item,i) in dataList" :key="i"> - <view class="list-left"> - <view class="list-left-item"> - <view class="desc">No锛�</view> - <view class="left-item">{{i + 1}}</view> - </view> - <view class="list-left-item"> - <view class="desc">绠辩爜锛�</view> - <view class="left-item">{{item.containerCode ? item.containerCode : '--'}}</view> - </view> - <view class="list-left-item"> - <view class="desc">閿�鍞崟鍙凤細</view> - <view class="left-item">{{item.csocode ? item.csocode : '--'}}</view> - </view> - <view class="list-left-item"> - <view class="desc">璁㈠崟琛屽彿锛�</view> - <view class="left-item">{{item.isoseq ? item.isoseq : '--'}}</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> - <view class="list-left-item"> - <view class="desc">鍝佸悕锛�</view> - <view class="left-item">{{item.maktx}}</view> - </view> - <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> - <view class="left-item">{{item.specs}}</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> - </view> - </view> - </scroll-view> - <!-- 搴曢儴鎿嶄綔鎸夐挳 --> - <view class="buttom"> - <button size="mini" @click="reset('warn')">閲嶇疆</button> - <button size="mini" type="primary" @click="combConfirm('warn')">瑙g粦</button> - </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> - <!-- 纭瑙g粦 --> - <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 class="keyboard" :class="hidebg" mode="aspectFit" @click="hideKeyboard"> - <image src="@/static/img/keyboard1.png" style="height: 70%;width: 70%;"></image> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - baseUrl: '', - token: '', - barcode: '', - orderNo: '', - dataList: [], - count: 0, - rowNum: '', - matnr: '', - batch: '', - weight: '', - msgType1: 'success', - msgType: 'success', - messageText: '', - title: '', - content: '', - barcodeFocus: true, - matData: '', - removeNum: 0, - tempOrderInfo: {csocode: '',isoseq: ''}, - hide: true, - hidebg: 'kb-bgtr' - } - }, - onLoad() { - // #ifdef APP - setInterval(()=>{ - if (this.hide) { - uni.hideKeyboard() - } else { - - } - },20) - // #endif - }, - onBackPress() { - this.hide = false - }, - onShow() { - this.baseUrl = uni.getStorageSync('baseUrl'); - this.token = uni.getStorageSync('token'); - }, - methods: { - hideKeyboard() { - this.hide = this.hide ? false : true - if (this.hide) { - this.hidebg = 'kb-bgtr' - } else { - this.hidebg = 'kb-bgfa' - } - }, - messageToggle(type) { - this.msgType1 = type - this.$refs.message.open() - }, - // barcode input 浜嬩欢 - barcodeInput() { - // 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏� - setTimeout(() => { - var len = this.barcode.length - if (len != 8) { - uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', - icon: "none", - position: 'top' - }); - this.barcodeFocuss() - return; - } - let that = this - uni.request({ - url: that.baseUrl + '/mobile/check/waitPakin/auth', - data: that.barcode, - method: 'POST', - header: { 'token': uni.getStorageSync('token') }, - success(res) { - res = res.data - if (res.code === 200) { - if (res.data.length > 0) { - for (let i of res.data) { - that.dataList.push(i) - } - } else { - uni.showToast({ - title: `${that.barcode}: 姝ゆ墭鐩樼爜鏆傛湭瑙g粦`, - icon: "none", - position: 'top' - }); - setTimeout(()=>{ - that.resst(); - },1000) - } - } - } - }) - }, 200) - }, - // 鎵樼洏鐮佹湁璇噸缃� - barcodeFocuss() { - let that = this; - that.barcodeFocus = false; - setTimeout(() => { - that.barcode = ''; - that.barcodeFocus = true; - }, 100); - }, - // 鍟嗗搧鍏夋爣娓呯┖閲嶇疆 - focuss() { - this.focus = false; - setTimeout(() => { - this.matnr = ''; - this.matFocus = true; - }, 100); - }, - // 淇敼鎵瑰彿 - revise(item, i) { - this.matnr = this.dataList[i].matnr - this.count = this.dataList[i].anfme - this.batch = this.dataList[i].batch - this.weight = this.dataList[i].weight - this.rowNum = i - 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() { - this.messageText = "绉婚櫎鎴愬姛" - this.messageToggle('success') - this.dataList.splice(this.removeNum, 1) - }, - // 鍙栨秷绉婚櫎 - removeClose() { - this.$refs.alertDialog.close() - }, - reviseConfirm() { - this.dataList[this.rowNum].anfme = this.count - this.dataList[this.rowNum].batch = this.batch - this.dataList[this.rowNum].weight = this.weight - this.matnr = '' - this.messageText = "淇敼鎴愬姛" - this.messageToggle('success') - this.$refs.revise.close() - }, - reviseClose() { - this.$refs.revise.close() - }, - changeValue(value) { - this.count = value - }, - combConfirm(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪瑙g粦!' - this.$refs.combConfirm.open() - }, - combClose() { - this.$refs.combConfirm.close() - }, - comb() { - let that = this; - if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" - this.messageToggle('error') - return; - } - if (that.dataList.length === 0) { - this.messageText = "姝ゆ墭鐩樻殏鏃犵粍鎵�" - this.messageToggle('error') - return; - } - uni.request({ - url: that.baseUrl + '/mobile/untie/auth', - data: that.barcode, - method: 'POST', - header: { - 'token': uni.getStorageSync('token') - }, - success(result) { - var res = result.data - if (res.code === 200) { - that.resst(); - that.messageText = "瑙g粦鎴愬姛" - that.messageToggle('success') - const innerAudioContext = uni.createInnerAudioContext(); - innerAudioContext.src = '/static/music/pakinOk.mp3'; - innerAudioContext.play() - } else if (res.code == 403) { - that.messageText = res.msg - that.messageToggle('error') - setTimeout(() => { - uni.reLaunch({ - url: '../login/login' - }); - }, 1000); - } else { - that.messageText = res.msg - that.messageToggle('error') - } - } - }); - }, - reset(type) { - this.msgType = type - this.title = '璀﹀憡' - this.content = '鏄惁閲嶇疆!' - this.$refs.resetConfirm.open() - }, - // 纭閲嶇疆 - resetConfirm() { - this.dataList = [] - this.barcode = '' - this.messageText = "閲嶇疆瀹屾垚" - this.messageToggle('success') - }, - // 鍙栨秷閲嶇疆 - resetClose() { - - }, - // 娓呯┖ - resst() { - this.dataList = [] - this.barcode = '' - this.orderNo = '' - this.barcodeFocuss() - }, - } - } -</script> - -<style> - @import url('../../../static/css/wms.css/wms.css'); - - .keyboard{ - width: 40px;height: 40px;background-size: 100%;position: absolute;z-index: 99; - top: 5px;right: 5px; border-radius: 50%; - display: flex;align-items: center;justify-content: center; - } - .kb-bgtr { - background-color: #55557f; - } - .kb-bgfa { - background-color: #00aeec; - } - .list:first-child { - margin-top: 200rpx; - } - .code { - width: 100%; - position: fixed; - min-height: 70rpx; - background-color: #FFF; - z-index: 10; - } - - .item { - display: flex; - align-items: center; - height: 70rpx; - 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 { - height: 80rpx; - line-height: 80rpx; - width: 100%; - background-color: white; - position: fixed; - margin-top: 70rpx; - z-index: 9; - /* border-top: 1px solid #DCDFE6; */ - text-align: center; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); - } -</style> - diff --git a/pages/tzsk/work/wrkMast.vue b/pages/tzsk/work/wrkMast.vue deleted file mode 100644 index c83a938..0000000 --- a/pages/tzsk/work/wrkMast.vue +++ /dev/null @@ -1,117 +0,0 @@ -<template> - <view> - <view class="code"> - <uni-search-bar :focus="searchFocus" v-model="searchValue" @input="searchInput()" ma - maxlength="500" ancel="cancel" @clear="clear" placeholder="杈撳叆 / 鎵弿鍟嗗搧"> - </uni-search-bar> - </view> - <view class="list" v-for="(item,i) in dataList"> - <!-- 宸︿晶 --> - <view class="list-left"> - <!-- 宸︿笂 --> - <view class="list-left-top"> - <view>宸ヤ綔鍙�4099</view> - <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> - <text style="flex: 1;">宸ヤ綔鐘舵��</text> - <text>201.鐢熸垚鍏ュ簱浠诲姟ID</text> - </view> - <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> - <text style="flex: 1;">鍏ュ嚭搴撶被鍨�</text> - <text>1.鍏ュ簱</text> - </view> - <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> - <text style="flex: 1;">浼樺厛绾�</text> - <text>300</text> - </view> - <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> - <text style="flex: 1;">婧愬簱浣�</text> - <text>CS-101-001-01@1</text> - </view> - <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> - <text style="flex: 1;">鐩爣搴撲綅</text> - <text>YZ-015-001-01@1</text> - </view> - <view style="display: flex;border-bottom: 1px solid #FFF;margin: 10rpx;"> - <text style="flex: 1;">鏂欑鐮�</text> - <text>1112223335</text> - </view> - </view> - <!-- 宸︿笅 --> - <view class="list-left-bottom"> - <button size="mini">鏄庣粏</button> - <button size="mini">瀹屾垚</button> - <button size="mini">鍙栨秷</button> - </view> - </view> - <!-- 鍙充晶 --> - <!-- <view class="list-right"></view> --> - </view> - </view> -</template> - -<script> - export default { - data() { - return { - searchValue: '', - searchFocus: true, - dataList: [ - {}, - {}, - {} - ] - } - }, - methods: { - // 鎼滅储妗嗚緭鍏� - searchInput() { - - }, - // 閲嶇疆鎼滅储妗� - clear() { - - } - } - } -</script> - -<style> - .code { - background-color: #d9d9d9; - z-index: 99; - position: sticky; - top: 80rpx; - left: 0; - } - .list { - margin: 20rpx; - background-color: #fff; - background-color: #157ec1; - color: #FFF; - border-radius: 20rpx; - border: 1px solid #eeeeee; - display: flex; - position: relative; - } - .list-left { - flex: 1; - position: relative; - } - .list-left-top { - /* border-bottom: 1px solid #eeeeee; */ - padding: 20rpx; - } - .list-left-bottom { - border-bottom: 1px solid #eeeeee; - padding: 10rpx; - display: flex; - justify-content: space-around; - } - .list-right { - width: 100rpx; - border-left: 1px solid #eeeeee; - display: flex; - align-items: center; - justify-content: center; - } -</style> -- Gitblit v1.9.1