From ff777cd28199571a5810b682b038b96d02d4d360 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期五, 07 三月 2025 16:24:48 +0800
Subject: [PATCH] #
---
pages/order/orderPakin2.vue | 136 ++++++++++++++++++++++++++-------------------
1 files changed, 78 insertions(+), 58 deletions(-)
diff --git a/pages/order/orderPakin2.vue b/pages/order/orderPakin2.vue
index 5b9ed4d..d372459 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>
@@ -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">
@@ -207,7 +211,7 @@
// 涓嶈缃畾鏃跺櫒 浼氬嚭鐜版壂鍏ョ殑瀛楃涓蹭笉鍏�
setTimeout(() => {
var len = this.barcode.length
- if (len != 8) {
+ if (len >= 9 && len <=8) {
uni.showToast({
title: '鎵樼洏鐮佹湁璇閲嶈瘯',
icon: "none",
@@ -241,57 +245,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 +330,7 @@
that.matnr = ''
},
checkMat(mat) {
+ mat.review = "鏈鏍�"
var len = this.dataList.length
var add = true ,sameItem = false
for (var i = 0; i < len; i++) {
@@ -421,11 +435,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',
@@ -540,7 +560,7 @@
width: 100%;
background-color: white;
position: fixed;
- margin-top: 200rpx;
+ margin-top: 300rpx;
z-index: 9;
/* border-top: 1px solid #DCDFE6; */
text-align: center;
--
Gitblit v1.9.1