From 25c4845fb77614a5cc0bbdb8cbebf019e4780783 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期三, 15 十一月 2023 12:54:44 +0800
Subject: [PATCH] #
---
pages/mat/matSelected.vue | 4 +
pages/pakin/goodsDown.vue | 2
pages/pakin/goodsUp2.vue | 148 ++++++++++++++++++++++++++++++++++++-------------
pages/mat/matQuery.vue | 2
4 files changed, 115 insertions(+), 41 deletions(-)
diff --git a/pages/mat/matQuery.vue b/pages/mat/matQuery.vue
index dfbc48c..70d1fac 100644
--- a/pages/mat/matQuery.vue
+++ b/pages/mat/matQuery.vue
@@ -23,7 +23,7 @@
</view>
<view class="tag-item">鍟嗗搧缂栧彿锛� {{item.matnr}}</view>
<view class="tag-item">鍟嗗搧鍚嶇О锛� {{item.maktx ? item.maktx : '--'}}</view>
- <view class="tag-item">鍟嗗搧瑙勬牸锛� {{item.specs ? item.specs : '--'}}</view>
+ <view class="tag-item">鍟嗗搧浜у湴锛� {{item.origin ? item.origin : '--'}}</view>
</view>
</view>
<uni-load-more v-show="matList.length != 0" :status="status" :icon-size="16" :content-text="contentText" />
diff --git a/pages/mat/matSelected.vue b/pages/mat/matSelected.vue
index 60560ac..a691ddf 100644
--- a/pages/mat/matSelected.vue
+++ b/pages/mat/matSelected.vue
@@ -13,6 +13,10 @@
<view class="form-item-desc"><text>瑙勬牸</text></view>
<view class="form-item-content"><text>{{mat.specs}}</text></view>
</view>
+ <view class="form-item">
+ <view class="form-item-desc"><text>浜у湴</text></view>
+ <view class="form-item-content"><text>{{mat.origin}}</text></view>
+ </view>
<!-- <view class="form-item">
<view class="form-item-desc"><text>鎵瑰彿</text></view>
<view class="form-item-content">
diff --git a/pages/pakin/goodsDown.vue b/pages/pakin/goodsDown.vue
index 9819cab..5d798d0 100644
--- a/pages/pakin/goodsDown.vue
+++ b/pages/pakin/goodsDown.vue
@@ -205,7 +205,7 @@
// 鎼滅储鐗╂枡
findMat() {
let that = this
- if(that.matnr.length < 10){
+ if(that.matnr.length < 5){
that.barcodeFocuss()
return;
}
diff --git a/pages/pakin/goodsUp2.vue b/pages/pakin/goodsUp2.vue
index 6782f40..55fe206 100644
--- a/pages/pakin/goodsUp2.vue
+++ b/pages/pakin/goodsUp2.vue
@@ -3,12 +3,15 @@
<view class="code">
<view class="item">
<view class="code-decs">鏉$爜:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="orderNo" :focus="barcodeFocus"
- @input="search()">
+ <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="璇烽�夋嫨鏉ユ簮鍦�" :focus="barcodeFocus" v-model="orderNo" @input="findMat"></uni-combox>
+ <uni-combox :candidates="orderNoList" placeholder="璇烽�夋嫨鏉ユ簮鍦�" v-model="origin"></uni-combox>
+ </view>
+ <view class="item">
+ <view class="code-decs">搴撲綅鐮�:</view>
+ <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="locNo" >
</view>
<view class="item">
<view class="code-decs">鐗╂枡鐮�:</view>
@@ -33,23 +36,18 @@
<view class="list-left-item">
<view class="desc">缂栫爜锛�</view>
<view class="left-item">
- <uni-tag :text="item.matnr" type="primary"></uni-tag>
+ {{item.matnr}}
</view>
</view>
<view class="list-left-item">
- <view class="desc">鍝佸悕锛�</view>
+ <view class="desc">鍚嶇О锛�</view>
<view class="left-item">{{item.maktx}}</view>
- </view>
+ </view>
<view class="list-left-item">
- <view class="desc">搴撲綅锛�</view>
- <view class="left-item">{{item.locNo}}</view>
+ <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">
- <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>
@@ -57,14 +55,14 @@
</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> -->
+ <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>
+ <button size="mini" type="primary" @click="combConfirm('warn')">涓婃灦</button>
</view>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -153,21 +151,45 @@
matFocus: false,
matData: '',
orderNo:'',
- locNo:''
+ locNo:'',
+ orderNoList: [],
+ code:'',
+ origin:''
}
},
onLoad() {
-
+
},
onShow() {
this.baseUrl = uni.getStorageSync('baseUrl');
this.token = uni.getStorageSync('token');
+ this.getOrderNoList()
},
methods: {
+ findCode(){
+ let that = this
+ if(that.code.length < 10){
+ that.barcodeFocuss()
+ return;
+ }
+ },
messageToggle(type) {
this.msgType1 = type
this.$refs.message.open()
+ },
+ getOrderNoList() {
+ let that = this
+ uni.request({
+ url: this.baseUrl + '/originRule/list/all',
+ method: 'POST',
+ success(res) {
+ res = res.data
+ for (var i = 0; i < res.data.length; i++) {
+ that.orderNoList.push(res.data[i])
+ }
+ }
+ })
},
// 鏍规嵁鎵樼洏鐮佹悳绱�
search() {
@@ -206,7 +228,7 @@
let that = this;
that.barcodeFocus = false;
setTimeout(() => {
- that.barcode = '';
+ that.code = '';
that.barcodeFocus = true;
}, 100);
},
@@ -253,9 +275,9 @@
},
},
});
- } else if (res.code == 403) {
+ } else if (result.code == 403) {
uni.showToast({
- title: res.msg,
+ title: result.msg,
icon: "none",
position: 'top'
})
@@ -266,7 +288,7 @@
}, 1000);
} else {
uni.showToast({
- title: res.msg,
+ title: result.msg,
icon: "none",
position: 'top'
})
@@ -377,7 +399,7 @@
combConfirm(type) {
this.msgType = type
this.title = '璀﹀憡'
- this.content = '鏄惁纭鐩樼偣!'
+ this.content = '鏄惁纭涓婃灦!'
this.$refs.combConfirm.open()
},
combClose() {
@@ -407,35 +429,66 @@
this.barcodeFocuss()
},
adjust() {
- let that = this
- var combMats = []
- var combParam = {}
- combParam['orderNo'] = that.orderNo
- combParam['wrkDetls'] = that.dataList
+ uni.vibrateShort();
+ let that = this;
+ if (that.code === '') {
+ this.messageText = "璇疯緭鍏ユ潯鐮�"
+ this.messageToggle('error')
+ return;
+ }
+ if (that.origin === '') {
+ this.messageText = "璇烽�夋嫨鏉ユ簮鍦�"
+ this.messageToggle('error')
+ return;
+ }
+ 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/adjustNew/auth',
+ url: that.baseUrl + '/mobile/manDetl/in/origin',
+ data: JSON.stringify({
+ locNo:that.locNo,
+ code:that.code,
+ origin:that.origin,
+ combMats: that.dataList
+ }),
method: 'POST',
- data: JSON.stringify(combParam),
header: {
- 'token':uni.getStorageSync('token')
+ 'token': uni.getStorageSync('token')
},
success(result) {
var res = result.data
if (res.code === 200) {
- that.dataList = []
- that.barcode = ''
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ that.resst();
+ that.messageText = "涓婃灦鎴愬姛"
+ that.messageToggle('success')
} else if (res.code == 403) {
- uni.showToast({title: res.msg, icon: "none", position: 'top'})
+ that.messageText = res.msg
+ that.messageToggle('error')
setTimeout(() => {
uni.reLaunch({
url: '../login/login'
});
}, 1000);
} else {
- uni.showToast({title: res.msg, icon: "none",position: 'top'})
+ that.messageText = res.msg
+ that.messageToggle('error')
}
- },
+ }
});
},
}
@@ -448,7 +501,7 @@
.code {
width: 100%;
position: fixed;
- min-height: 200rpx;
+ min-height: 400rpx;
background-color: #FFF;
z-index: 10;
}
@@ -488,10 +541,27 @@
width: 100%;
background-color: white;
position: fixed;
- margin-top: 200rpx;
+ margin-top: 400rpx;
z-index: 9;
/* border-top: 1px solid #DCDFE6; */
text-align: center;
box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5);
}
+
+ .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: 500rpx;
+ }
+
+ .list:last-child {
+ margin-bottom: 120rpx;
+ }
</style>
--
Gitblit v1.9.1