From 46e91bad035053a7e2401dba92db443c7f3530e7 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 11 九月 2024 12:31:00 +0800
Subject: [PATCH] #
---
pages/pakin/goodsUp2.vue | 106 ++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 81 insertions(+), 25 deletions(-)
diff --git a/pages/pakin/goodsUp2.vue b/pages/pakin/goodsUp2.vue
index 89a43cc..16561f3 100644
--- a/pages/pakin/goodsUp2.vue
+++ b/pages/pakin/goodsUp2.vue
@@ -6,10 +6,6 @@
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="code" :focus="barcodeFocus" @input="findCode()">
</view>
<view class="item">
- <view class="code-decs">鏉ユ簮鍦�:</view>
- <uni-combox :candidates="orderNoList" placeholder="璇烽�夋嫨鏉ユ簮鍦�" v-model="origin"></uni-combox>
- </view>
- <view class="item">
<view class="code-decs">璐т富:</view>
<uni-combox :candidates="ownerList" placeholder="璇烽�夋嫨璐т富" v-model="owner"></uni-combox>
</view>
@@ -17,15 +13,15 @@
<view class="code-decs">搴撲綅鐮�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo" >
</view>
- <view class="item">
+ <!-- <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 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">
鍟嗗搧鍒楄〃
@@ -51,9 +47,13 @@
<view class="desc">浜у湴锛�</view>
<view class="left-item">{{item.origin}}</view>
</view>
+ <view class="list-left-item">
+ <view class="desc">鎵规锛�</view>
+ <view class="left-item">{{item.batch}}</view>
+ </view>
<view class="list-left-item">
- <view class="desc">鍏枻锛�</view>
+ <view class="desc">鍏枻(鏁伴噺)锛�</view>
<view class="left-item">{{item.anfme}}</view>
</view>
</view>
@@ -164,7 +164,16 @@
}
},
onLoad() {
-
+ // 娌″暐鐢ㄤ簡
+ let that = this
+ // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ const eventChannel = this.getOpenerEventChannel();
+
+ // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ eventChannel.on('item', function(data) {
+ // console.log(data.item);
+ that.origin = data.item
+ })
},
onShow() {
this.baseUrl = uni.getStorageSync('baseUrl');
@@ -175,10 +184,52 @@
methods: {
findCode(){
let that = this
- if(that.code.length < 10){
- that.barcodeFocuss()
- return;
- }
+ uni.request({
+ url: that.baseUrl + '/mobile/manDetl/in/origin/origin',
+ header: { 'token':uni.getStorageSync('token') ,
+ "content-type":"application/x-www-form-urlencoded"},
+ data: {
+ code: that.code,
+ origin: that.origin,
+ },
+ method: 'GET',
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ let item = {matnr:res.data.matnr,batch:res.data.batch,weight:res.data.anfme}
+ let matnr = {}
+ that.findMat2(res.data.matnr).then(result=>{
+ result['batch'] = res.data.batch
+ result['anfme'] = res.data.anfme
+ result.weight = res.data.weight
+ that.dataList.push(result)
+ })
+
+ that.barcodeFocus = false
+ setTimeout(()=>{
+ that.code = ''
+ that.barcodeFocus = true
+ })
+ }
+ }
+ })
+ },
+ async findMat2(matnr) {
+ let that = this
+ let item = {}
+ let abb = await uni.request({
+ url: that.baseUrl + '/mat/auth',
+ data: {
+ matnr: matnr
+ },
+ header: {
+ 'token': uni.getStorageSync('token')
+ },
+
+ }).then((result)=> {
+ item = result.data.data
+ })
+ return item
},
messageToggle(type) {
this.msgType1 = type
@@ -293,7 +344,11 @@
// 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
events: {
matList: function(data) {
- that.checkMat(data.data)
+ // that.checkMat(data.data)
+ for(let i = 0; i < data.data.count; i++) {
+ // that.checkMat(data.data)
+ that.dataList.unshift(data.data.mat)
+ }
},
},
});
@@ -448,6 +503,8 @@
resst() {
this.dataList = []
this.barcode = ''
+ this.locNo = ''
+ this.owner = ''
this.barcodeFocuss()
},
adjust() {
@@ -481,12 +538,11 @@
}
}
uni.request({
- url: that.baseUrl + '/mobile/manDetl/in/origin',
+ url: that.baseUrl + '/mobile/manDetl/in/no/origin',
data: JSON.stringify({
locNo:that.locNo,
- code:that.code,
- origin:that.origin,
- combMats: that.dataList
+ combMats: that.dataList,
+ owner: that.owner
}),
method: 'POST',
header: {
@@ -523,7 +579,7 @@
.code {
width: 100%;
position: fixed;
- min-height: 400rpx;
+ min-height: 300rpx;
background-color: #FFF;
z-index: 10;
}
@@ -563,7 +619,7 @@
width: 100%;
background-color: white;
position: fixed;
- margin-top: 400rpx;
+ margin-top: 300rpx;
z-index: 9;
/* border-top: 1px solid #DCDFE6; */
text-align: center;
@@ -580,7 +636,7 @@
}
.list:first-child {
- margin-top: 500rpx;
+ margin-top: 440rpx;
}
.list:last-child {
--
Gitblit v1.9.1