From 58bc1b673e1673936aa9dfee79c619f2407b8b4e Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期三, 27 三月 2024 09:22:45 +0800 Subject: [PATCH] # --- pages/phyz/order/orderList.vue | 13 pages/home/orderManage.vue | 7 pages.json | 16 + pages/phyz/AGV/AGVPakin3.vue | 719 ++++++++++++++++++++++++++++++++++++++++++++ pages/phyz/order/outOrder.vue | 153 +++++++++ 5 files changed, 906 insertions(+), 2 deletions(-) diff --git a/pages.json b/pages.json index ba2bac7..7b7c1b8 100644 --- a/pages.json +++ b/pages.json @@ -498,6 +498,22 @@ "navigationBarTitleText" : "绔欑偣鏌ヨ缁存姢", "enablePullDownRefresh" : false } + }, + { + "path" : "pages/phyz/order/outOrder", + "style" : + { + "navigationBarTitleText" : "璁㈠崟鍑哄簱", + "enablePullDownRefresh" : false + } + }, + { + "path" : "pages/phyz/AGV/AGVPakin3", + "style" : + { + "navigationBarTitleText" : "缁勬墭鍏ュ簱", + "enablePullDownRefresh" : false + } } diff --git a/pages/home/orderManage.vue b/pages/home/orderManage.vue index b7de376..8555208 100644 --- a/pages/home/orderManage.vue +++ b/pages/home/orderManage.vue @@ -32,6 +32,13 @@ // cuIcon: 'pullup', url: `/phyz/order/purchaseOrder` }, + { + title: '鍑哄簱鍗�', + name: 'outOrder', + color: 'blue', + // cuIcon: 'pullup', + url: `/phyz/order/outOrder` + }, ], colorList: ['cyan','blue','purple','mauve','pink','brown','red','orange','yellow','olive','olive','grey' ] }; diff --git a/pages/phyz/AGV/AGVPakin3.vue b/pages/phyz/AGV/AGVPakin3.vue new file mode 100644 index 0000000..1f45943 --- /dev/null +++ b/pages/phyz/AGV/AGVPakin3.vue @@ -0,0 +1,719 @@ +<template> + <view> + <view class="code"> + <view class="item"> + <input type="text" placeholder=" 鎵爜 / 杈撳叆 璁㈠崟鍙�" v-model="orderNo" :focus="orderNoFocus" + @input="findOrder()"> + </view> + <view class="item"> + <input type="text" placeholder=" 鎵爜 / 杈撳叆 鏂欑鐮�" v-model="barcode" :focus="barcodeFocus" + @input="barcodeInput()"> + </view> + <view class="item"> + <input type="text" placeholder=" 鎵爜 / 杈撳叆 鏆傚瓨浣�" v-model="stationCode" :focus="stationCodeFocus" + @input="stationCodeInput()"> + </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"> + <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: true, + stationCodeFocus: false, + matFocus: false, + orderNoFocus: false, + 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 + let that = this + // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE + const eventChannel = this.getOpenerEventChannel(); + + // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� + eventChannel.on('mats', function(data) { + console.log(data); + that.orderNo = data.mats[0].orderNo + that.dataList = data.mats + }) + }, + 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') + uni.navigateBack({ + delta: 2 + }); + } + } 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') + uni.navigateBack({ + delta: 2 + }); + } 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: 210rpx; + 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/phyz/order/orderList.vue b/pages/phyz/order/orderList.vue index 6e31484..6e816e0 100644 --- a/pages/phyz/order/orderList.vue +++ b/pages/phyz/order/orderList.vue @@ -74,6 +74,16 @@ that.getOrderDetl(data.item.id) }) + eventChannel.on('item1', function(data) { + console.log(data); + that.orderId = data.item.orderId + uni.setNavigationBarTitle({ + title: data.item.orderNo, + + }) + that.getOrderDetl(data.item.id) + + }) }, onShow() { if (this.dataList.length > 0) { @@ -85,7 +95,6 @@ // 璁㈠崟鏄庣粏 getOrderDetl(id) { let _this = this - console.log(id); uni.request({ url: `${_this.baseUrl}/orderDetl/list/auth`, header: {'token': uni.getStorageSync('token')}, @@ -187,7 +196,7 @@ return } uni.navigateTo({ - url: "../AGV/AGVPakin2", + url: "../AGV/AGVPakin3", success: function(res) { // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 res.eventChannel.emit('mats', { diff --git a/pages/phyz/order/outOrder.vue b/pages/phyz/order/outOrder.vue new file mode 100644 index 0000000..49bcd2e --- /dev/null +++ b/pages/phyz/order/outOrder.vue @@ -0,0 +1,153 @@ +<template> + <view class="container"> + <view class="code"> + <uni-search-bar :focus="searchValueFocus" v-model="searchValue" @input="searchValueInput()" + maxlength="500" ancel="cancel" @clear="clear" placeholder="杈撳叆 / 鎵弿 璁㈠崟鍙�"> + </uni-search-bar> + <view class="code-title"> + <view></view> + <view>鍗曟嵁鍒楄〃</view> + <view></view> + <!-- <view @click="allChecked">{{allCheckBtnTitle}}</view> --> + </view> + </view> + <view class="list" v-for="(item,i) in dataList"> + <view class="list-left"> + <view>鍗曟嵁缂栧彿锛歿{item.orderNo}}</view> + <view>鍗曟嵁绫诲瀷锛歿{item.docType$}}</view> + <view>鍒涘缓鏃堕棿锛歿{item.createTime$}}</view> + <!-- <view class="card-id">{{i + 1}}</view> --> + <view class="card-status-1" v-if="item.settle == 1">{{item.settle$}}</view> + <view class="card-status-2" v-if="item.settle == 2">{{item.settle$}}</view> + <view class="card-status-4" v-if="item.settle == 4">{{item.settle$}}</view> + </view> + <!-- <view class="list-right" @click="checkboxChange(item)"> + <label > + <checkbox :value="item.orderNo" :checked="item.checked" color="#FFCC33" style="transform:scale(0.7)" /><text></text> + </label> + </view> --> + <view class="list-right" @click="getOrderDetl(item)"> + <uni-icons type="right" color="#c1c1c1"></uni-icons> + </view> + </view> + <view style="height: 100rpx;"></view> + </view> +</template> + +<script> + export default { + data() { + return { + baseUrl: '', + token: '', + searchValueFocus: true, + searchValue: '', + checck: true, + dataList: [], + oldDataList: [], + newDataList: [], + allCheck: false, + allCheckBtnTitle: '鍏ㄩ��', + } + }, + onShow() { + this.baseUrl = uni.getStorageSync('baseUrl'); + this.token = uni.getStorageSync('token'); + this.getOrderList() + }, + + methods: { + searchValueInput() { + let count = 0 + let sign = 0 + this.dataList = [...this.oldDataList] + this.newDataList = [] + for (let k in this.dataList) { + if (!this.dataList[k].orderNo.includes(this.searchValue)) { + count++; + } else { + this.newDataList.push(this.dataList[k]) + } + } + this.dataList = this.newDataList + }, + checkboxChange(e) { + let items = this.dataList, + values = e.orderNo; + if (e.checked) { + this.$set(e,'checked',false) + } else { + this.$set(e,'checked',true) + } + }, + allChecked() { + if (this.allCheck) { + this.allCheck = false + this.allCheckBtnTitle = '鍏ㄩ��' + } else { + this.allCheck = true + this.allCheckBtnTitle = '鍙栨秷' + } + for (let item of this.dataList) { + if (this.allCheck) { + this.$set(item,'checked',true) + } else { + this.$set(item,'checked',false) + } + } + }, + clear() { + this.matnr = '' + this.dataList = [...this.oldDataList] + }, + // 鑾峰彇璁㈠崟鍒楄〃 + getOrderList() { + let _this = this + uni.request({ + url: `${_this.baseUrl}/order/nav/list/auth`, + header: {'token': uni.getStorageSync('token')}, + data: { + curr: 1, + limit: 1000, + }, + method: 'GET', + success(res) { + res = res.data + if (res.code === 200) { + _this.dataList = res.data + _this.oldDataList = [..._this.dataList] + } + } + }) + }, + // 鑾峰彇璁㈠崟鏄庣粏 + getOrderDetl(item) { + let _this = this + uni.navigateTo({ + url: "./orderList", + success: function(res) { + // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� 鍚戝彟澶栦竴涓〉闈紶閫掑�肩殑 + res.eventChannel.emit('item1', { + item: item, + type: 'out' + }) + }, + events: { + // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� 鍙﹀涓�涓〉闈紶杩囨潵鐨� + acceptDataFromOpenedPage: function(data) { + // _this.matnr = data.data + _this.input(_this.matnr) + }, + }, + + + }); + } + + } + } +</script> + +<style> + @import url('../../../static/css/common/order.css'); +</style> \ No newline at end of file -- Gitblit v1.9.1