From a3ffaec9c9a81626c34989c7026988cc07b3c3d3 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期二, 16 九月 2025 13:54:24 +0800
Subject: [PATCH] #
---
pages/order/orderPakin2.vue | 169 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 97 insertions(+), 72 deletions(-)
diff --git a/pages/order/orderPakin2.vue b/pages/order/orderPakin2.vue
index fa138ab..2c5705e 100644
--- a/pages/order/orderPakin2.vue
+++ b/pages/order/orderPakin2.vue
@@ -13,15 +13,15 @@
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus"
@input="barcodeInput()">
</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">
+ <!-- <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>
</view>
<view class="mat-list-title">
鍟嗗搧鍒楄〃
@@ -63,6 +63,10 @@
<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.review}}</view>
+ </view>
</view>
<view class="list-right">
<uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons>
@@ -73,7 +77,7 @@
<!-- 搴曢儴鎿嶄綔鎸夐挳 -->
<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')" :disabled="isDisabled">缁勬墭</button>
</view>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -100,7 +104,7 @@
<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" />
+ <uni-number-box :value="count" :step='0.001' :max="9999999" color="#747474" @change="changeValue" />
</view>
</view>
<view class="btn">
@@ -165,14 +169,14 @@
matFocus: false,
matData: '',
removeNum: 0,
+ isDisabled:false
}
},
onLoad() {
let that = this
const eventChannel = this.getOpenerEventChannel();
- eventChannel.on('orderItem', function(data) {
- console.log(data.item)
+ eventChannel.on('orderItem', function(data) {
that.orderNo = data.item.orderNo
that.checkMat(data.item)
});
@@ -206,16 +210,7 @@
barcodeInput() {
// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
- var len = this.barcode.length
- if (len >= 9 && len <=8) {
- uni.showToast({
- title: '鎵樼洏鐮佹湁璇閲嶈瘯',
- icon: "none",
- position: 'top'
- });
- this.barcodeFocuss()
- return;
- }
+ var len = this.barcode.length
this.focuss()
}, 200)
},
@@ -241,57 +236,66 @@
let that = this
let m = that.matnr.split(";")
let matnr1 = m[0].slice(3)
- uni.request({
- url: that.baseUrl + '/mat/auth',
- data: {
- matnr: matnr1
- },
- 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'
- })
- }
-
+ for(var i = 0;i<that.dataList.length;i++){
+ if(that.dataList[i].matnr === matnr1){
+ that.dataList[i].review = "宸插鏍�"
}
- });
+
+ }
+ setTimeout(() => {
+ this.matnr = '';
+ }, 100);
+ // uni.request({
+ // url: that.baseUrl + '/mat/auth',
+ // data: {
+ // matnr: matnr1
+ // },
+ // 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() {
@@ -317,6 +321,8 @@
that.matnr = ''
},
checkMat(mat) {
+ mat.review = "鏈鏍�"
+ mat.anfme = mat.enableQty
var len = this.dataList.length
var add = true ,sameItem = false
for (var i = 0; i < len; i++) {
@@ -402,9 +408,9 @@
combClose() {
this.$refs.combConfirm.close()
},
- comb() {
- uni.vibrateShort();
+ comb() {
let that = this;
+ that.isDisabled = true
if (that.orderNo === '') {
this.messageText = "璇疯緭鍏ヨ鍗曟潯鐮�"
this.messageToggle('error')
@@ -421,11 +427,17 @@
return;
}
for (var i = 0; i < that.dataList.length; i++) {
+ if (that.dataList[i].review !== "宸插鏍�" ) {
+ this.messageText = that.dataList[i].matnr + '鏈鏍�'
+ this.messageToggle('error')
+ return;
+ }
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/comb/auth',
@@ -459,6 +471,13 @@
that.messageText = res.msg
that.messageToggle('error')
}
+ },
+ fail: () => {
+ that.messageText = "鎺ュ彛瓒呮椂"
+ that.messageToggle('error')
+ },
+ complete: () => {
+ that.isDisabled = false
}
});
},
@@ -540,10 +559,16 @@
width: 100%;
background-color: white;
position: fixed;
- margin-top: 200rpx;
+ margin-top: 300rpx;
z-index: 9;
/* border-top: 1px solid #DCDFE6; */
text-align: center;
box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
}
+ .list:first-child {
+ margin-top: 420rpx;
+ }
+ .list:last-child {
+ margin-bottom: 120rpx;
+ }
</style>
--
Gitblit v1.9.1