From 99fb1068a772f31fdc68d7a7aeb16c89233a8893 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期四, 18 一月 2024 15:20:02 +0800
Subject: [PATCH] #
---
pages/out/handIn.vue | 100 ++++++++++++++++++++++++++++++++-----------------
1 files changed, 65 insertions(+), 35 deletions(-)
diff --git a/pages/out/handIn.vue b/pages/out/handIn.vue
index 97550a5..70337de 100644
--- a/pages/out/handIn.vue
+++ b/pages/out/handIn.vue
@@ -80,7 +80,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>
<!-- 寮圭獥 -->
<!-- 淇敼鏁伴噺 -->
@@ -131,7 +131,7 @@
<uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
- <!-- 纭缁勬墭 -->
+ <!-- 纭鍏ュ簱 -->
<view>
<uni-popup ref="combConfirm" type="dialog">
<uni-popup-dialog :type="msgType" cancelText="鍙栨秷" confirmText="纭" :title="title" :content="content"
@@ -158,18 +158,7 @@
palletizingNo: '',
boxType: '',
createTime: '',
- dataList: [
- // {
- // matnr: '1',
- // maktx: '2',
- // boxNo: '3',
- // position: '4',
- // weight: '5',
- // anfme: '6',
- // batch: '7',
- // specs: '8',
- // }
- ],
+ dataList: [],
count: 0,
rowNum: '',
matnr: '',
@@ -187,6 +176,7 @@
matFocus: false,
matData: '',
removeNum: 0,
+ checkFlag: true,
}
},
onLoad() {
@@ -413,37 +403,27 @@
combConfirm(type) {
this.msgType = type
this.title = '璀﹀憡'
- this.content = '鏄惁鐜板湪缁勬墭!'
+ this.content = '鏄惁鐜板湪鍏ュ簱!'
this.$refs.combConfirm.open()
},
combClose() {
this.$refs.combConfirm.close()
},
comb() {
- uni.vibrateShort();
let that = this;
- if (that.barcode === '') {
- this.messageText = "璇锋壂鎻忔墭鐩樻潯鐮�"
- this.messageToggle('error')
- return;
+ that.combCheck(that.palletizingNo,that.boxType,that.createTime);
+ if (that.checkFlag) {
+ 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;
- }
- }
+ console.log(that.dataList);
uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
+ url: that.baseUrl + '/mobile/truss/comd/auth',
data: JSON.stringify({
barcode: that.barcode,
- combMats: that.dataList
+ palletizingNo: that.palletizingNo,
+ boxType: that.boxType,
+ createTime: that.createTime,
+ matLists: that.dataList
}),
method: 'POST',
header: {
@@ -453,7 +433,7 @@
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';
@@ -473,6 +453,56 @@
}
});
},
+ // 鎻愪氦鏍¢獙
+ combCheck(palletizingNo,boxType,createTime) {
+ if (this.barcode === '') {
+ this.messageText = "璇锋坊鍔犳墭鐩樼爜"
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ if (palletizingNo === '') {
+ this.messageText = "璇锋坊鍔犵爜鍨涗綅"
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ if (boxType === '') {
+ this.messageText = "璇锋坊鍔犳湪绠辩被鍨�"
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ if (createTime === '') {
+ this.messageText = "璇锋坊鍔犲垱寤烘椂闂�"
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ if (this.dataList.length === 0) {
+ this.messageText = "璇锋坊鍔犲叆搴撳晢鍝�"
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ for (let i = 0; i < this.dataList.length; i++) {
+ if (this.dataList[i].anfme == 0 || this.dataList[i].anfme == '') {
+ this.messageText = this.dataList[i].matnr + '閫�搴撴暟閲忎笉鑳戒负0'
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ }
+ for (let i = 0; i < this.dataList.length; i++) {
+ if (this.dataList[i].anfme == 0 || this.dataList[i].anfme == '') {
+ this.messageText = this.dataList[i].matnr + '閫�搴撴暟閲忎笉鑳戒负0'
+ this.messageToggle('error')
+ this.checkFlag = true;
+ return
+ }
+ }
+ this.checkFlag = false;
+ },
reset(type) {
this.msgType = type
this.title = '璀﹀憡'
--
Gitblit v1.9.1