From 3d5efbc419d3ddff189d8d0c36cf743887d28eaa Mon Sep 17 00:00:00 2001 From: whycq <10027870+whycq@user.noreply.gitee.com> Date: 星期一, 29 七月 2024 13:43:44 +0800 Subject: [PATCH] # --- pages/pakin/pakin.vue | 68 +++++++++++++++++++++------------- 1 files changed, 42 insertions(+), 26 deletions(-) diff --git a/pages/pakin/pakin.vue b/pages/pakin/pakin.vue index 1b57437..1ee825c 100644 --- a/pages/pakin/pakin.vue +++ b/pages/pakin/pakin.vue @@ -2,13 +2,13 @@ <view> <view class="code"> <view class="item"> - <view class="code-decs">鎵樼洏鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus" + <view class="code-decs">鎵樼洡纰�:</view> + <input type="text" placeholder=" 鎺冪⒓ / 杓稿叆" v-model="barcode" :focus="barcodeFocus" @input="barcodeInput()"> </view> <view class="item"> - <view class="code-decs">鐗╂枡鐮�:</view> - <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="matnr" :focus="matFocus" @input="findMat()"> + <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> @@ -27,7 +27,7 @@ <view class="left-item">{{i + 1}}</view> </view> <view class="list-left-item"> - <view class="desc">缂栫爜锛�</view> + <view class="desc">绶ㄧ⒓锛�</view> <view class="left-item"> <uni-tag :text="item.matnr" type="primary"></uni-tag> </view> @@ -37,17 +37,23 @@ <view class="left-item">{{item.maktx}}</view> </view> <view class="list-left-item"> - <view class="desc">瑙勬牸锛�</view> + <view class="desc">瑕忔牸锛�</view> <view class="left-item">{{item.specs}}</view> </view> <view class="list-left-item"> - <view class="desc">鎵瑰彿锛�</view> + <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"> + <uni-tag :text="item.weight" type="warning"></uni-tag> + </view> + </view> --> <view class="list-left-item"> - <view class="desc">鏁伴噺锛�</view> + <view class="desc">鏁搁噺锛�</view> <view class="left-item">{{item.anfme}}</view> </view> </view> @@ -60,7 +66,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')">绲勬墭</button> </view> <!-- 寮圭獥 --> <!-- 淇敼鏁伴噺 --> @@ -70,20 +76,24 @@ <!-- 鏍囬 --> <view class="title">淇敼</view> <view class="popup-item"> - <view class="popup-item-left">缂栫爜:</view> + <view class="popup-item-left">绶ㄧ⒓:</view> <view class="popup-item-right"> <input type="text" v-model="matnr" disabled="true" style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;"> </view> </view> <view class="popup-item"> - <view class="popup-item-left">鍚堝悓鍙�:</view> + <view class="popup-item-left">鎵硅櫉:</view> <view class="popup-item-right"><input type="text" v-model="batch"></view> </view> + <!-- <view class="popup-item"> + <view class="popup-item-left">閲嶉噺:</view> + <view class="popup-item-right"><input type="text" v-model="weight"></view> + </view> --> <view class="popup-item"> - <view class="popup-item-left">鏁伴噺:</view> + <view class="popup-item-left">鏁搁噺:</view> <view class="popup-item-right" style="border: none;justify-content: center;"> - <uni-number-box :value="count" :max="9999999" color="#747474" @change="changeValue" /> + <uni-number-box :value="count" :step='0.01' :max="9999999" color="#747474" @change="changeValue" /> </view> </view> <view class="btn"> @@ -110,14 +120,14 @@ <!-- 纭缁勬墭 --> <view> <uni-popup ref="combConfirm" type="dialog"> - <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content" + <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纰鸿獚" :title="title" :content="content" @confirm="comb" @close="combClose"></uni-popup-dialog> </uni-popup> </view> <!-- 纭閲嶇疆 --> <view> <uni-popup ref="resetConfirm" type="dialog"> - <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content" + <uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纰鸿獚" :title="title" :content="content" @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog> </uni-popup> </view> @@ -136,6 +146,7 @@ rowNum: '', matnr: '', batch: '', + weight: '', msgType1: 'success', msgType: 'success', messageText: '', @@ -166,7 +177,7 @@ var len = this.barcode.length if (len != 8) { uni.showToast({ - title: '鎵樼洏鐮佹湁璇閲嶈瘯', + title: '鎵樼洡纰兼湁瑾よ珛閲嶈│', icon: "none", position: 'top' }); @@ -226,9 +237,9 @@ }, }, }); - } else if (res.code == 403) { + } else if (result.code == 403) { uni.showToast({ - title: res.msg, + title: result.msg, icon: "none", position: 'top' }) @@ -239,7 +250,7 @@ }, 1000); } else { uni.showToast({ - title: res.msg, + title: result.msg, icon: "none", position: 'top' }) @@ -307,6 +318,7 @@ this.matnr = this.dataList[i].matnr this.count = this.dataList[i].anfme this.batch = this.dataList[i].batch + this.weight = this.dataList[i].weight this.rowNum = i this.eject() }, @@ -319,7 +331,7 @@ this.removeNum = i this.msgType = type this.title = '璀﹀憡' - this.content = '鏄惁绉婚櫎褰撳墠鍟嗗搧!' + this.content = '鏄惁绉婚櫎鐣跺墠鍟嗗搧!' this.$refs.alertDialog.open(i) }, // 纭绉婚櫎 @@ -335,6 +347,7 @@ reviseConfirm() { this.dataList[this.rowNum].anfme = this.count this.dataList[this.rowNum].batch = this.batch + this.dataList[this.rowNum].weight = this.weight this.matnr = '' this.messageText = "淇敼鎴愬姛" this.messageToggle('success') @@ -349,7 +362,7 @@ combConfirm(type) { this.msgType = type this.title = '璀﹀憡' - this.content = '鏄惁鐜板湪缁勬墭!' + this.content = '鏄惁鐝惧湪绲勬墭!' this.$refs.combConfirm.open() }, combClose() { @@ -359,18 +372,18 @@ uni.vibrateShort(); let that = this; if (that.barcode === '') { - this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�" + this.messageText = "璜嬫巸鎻忔墭鐩ゆ纰�" this.messageToggle('error') return; } if (that.dataList.length === 0) { - this.messageText = "璇锋坊鍔犲晢鍝佸垪琛�" + 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.messageText = that.dataList[i].matnr + '绲勬墭鏁搁噺涓嶈兘鐐�0' this.messageToggle('error') return; } @@ -389,8 +402,11 @@ var res = result.data if (res.code === 200) { that.resst(); - that.messageText = "缁勬墭鎴愬姛" + that.messageText = "绲勬墭鎴愬姛" that.messageToggle('success') + // const innerAudioContext = uni.createInnerAudioContext(); + // innerAudioContext.src = '/static/music/pakinOk.mp3'; + // innerAudioContext.play() } else if (res.code == 403) { that.messageText = res.msg that.messageToggle('error') @@ -482,6 +498,6 @@ z-index: 9; /* border-top: 1px solid #DCDFE6; */ text-align: center; - box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); + box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); } </style> -- Gitblit v1.9.1