From 0d2024eabd0f07bc4ab3341dddc10464d31938f8 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 21 十二月 2024 18:47:12 +0800 Subject: [PATCH] #新增订单筛选物料界面 --- pages/pakin/pakinSelector.vue | 163 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 163 insertions(+), 0 deletions(-) diff --git a/pages/pakin/pakinSelector.vue b/pages/pakin/pakinSelector.vue new file mode 100644 index 0000000..931a7ad --- /dev/null +++ b/pages/pakin/pakinSelector.vue @@ -0,0 +1,163 @@ +<template> + <view> + <scroll-view> + <view class="tag-list" v-for="(item,i) in matData" :key="i" @click="showTag(item)"> + <!-- <view class="tag"> + <view style="display: flex;"> + <view class="wms-tag" :style="baColor" >鍒嗙被</view> + </view> + </view> --> + <view class="tag-item">鍚嶇О锛歿{item.maktx}}</view> + <view class="tag-item">缂栫爜锛歿{item.matnr}}</view> + <view class="tag-item">鍨嬪彿锛歿{item.model}}</view> + <view class="tag-item">瑙勬牸锛歿{item.specs}}</view> + <view style="display: flex;"> + <view class="tag-item">鏁伴噺锛歿{item.anfme}}</view> + <view class="tag-item" style="display: flex;"> + <view > + 宸插畬鎴愶細 + </view> + <view style="color: green;"> + {{item.qty}} + </view> + </view> + <view class="tag-item" style="display: flex;"> + <view> + 鎵ц涓細 + </view> + <view style="color: red;"> + {{item.workQty}} + </view> + </view> + <view class="tag-item" style="display: flex;"> + <view> + 鍙粍鎷栵細 + </view> + <view style="color: blue;"> + {{item.mergeNum}} + </view> + </view> + </view> + </view> + </scroll-view> + </view> +</template> + +<script> + export default { + data() { + return { + matData: [], + barcode: '', + } + }, + onLoad(option) { + this.barcode = option.barcode + }, + + onShow() { + + this.getMats(this.barcode) + }, + + methods: { + showTag(pars) { + uni.navigateTo({ + url: "../mat/matSelected", + // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹� + success: function(res) { + res.eventChannel.emit('mat', { + data: pars + }) + }, + // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹� + events: { + matList: function(data) { + // that.checkMat(data.data) + // that.focuss() + }, + }, + }); + }, + + /** + * 鑾峰彇褰撳墠璁㈠崟涓嬫墍鏈夌墿鏂欐槑缁� + * @param {Object} barcode + */ + getMats(barcode) { + let that = this + uni.request({ + // url: that.baseUrl + '/mat/auth', + url: uni.getStorageSync('baseUrl') + '/pda/mat/auth', + method:'POST', + data: JSON.stringify({ + barcode: barcode, + }), + header: { + 'token': uni.getStorageSync('token') + }, + success(result) { + result = result.data + if (result.code === 200 && result.data) { + that.matData = result.data + that.matData['batch'] = '' + + } 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' + }) + } + + } + }); + } + } + } +</script> +<style> + @import url('../../static/css/wms.css/wms.css'); + .tag-list { + width: 94%; + min-height: 160rpx; + margin: 15rpx; + padding: 15rpx; + background-color: #FFF; + border-radius: 5px; + box-shadow: 0 5upx 20upx rgba(0, 0, 0, 0.2); + } + .tag { + display: flex; + flex-direction: column; + min-height: 80rpx; + border-bottom: 1px solid #e2e2e2; + } + .wms-tag { + min-width: 60rpx; + margin-left: 50rpx; + margin-top: 30rpx; + color: #FFF; + font-size: 14px; + padding: 4rpx 12rpx; + } + .tag-item { + width: 100%; + min-height: 60rpx; + line-height: 2; + /* padding: 20rpx auto; */ + color: #606266; + font-size: 14px; + } +</style> -- Gitblit v1.9.1