From a6f0256e1a56f43a39946474865650b92453c5e0 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 19 一月 2024 16:05:57 +0800
Subject: [PATCH] #
---
pages/out/stockOut.vue | 100 +++++++++++++++++++++++++++++---------------------
1 files changed, 58 insertions(+), 42 deletions(-)
diff --git a/pages/out/stockOut.vue b/pages/out/stockOut.vue
index 97550a5..e7df698 100644
--- a/pages/out/stockOut.vue
+++ b/pages/out/stockOut.vue
@@ -2,10 +2,6 @@
<view>
<view class="code">
<view class="item">
- <view class="code-decs">鎵樼洏鐮�:</view>
- <input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="barcode" :focus="barcodeFocus">
- </view>
- <view class="item">
<view class="code-decs">鐮佸灈浣�:</view>
<input type="text" placeholder=" 鎵爜 / 杈撳叆" v-model="palletizingNo" :focus="palletizingNoFocus">
</view>
@@ -80,7 +76,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 +127,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 +154,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,10 +172,8 @@
matFocus: false,
matData: '',
removeNum: 0,
+ checkFlag: true,
}
- },
- onLoad() {
-
},
onShow() {
this.baseUrl = uni.getStorageSync('baseUrl');
@@ -413,34 +396,20 @@
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;
- }
- 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;
- }
+ that.combCheck(that.palletizingNo,that.boxType,that.createTime);
+ if (that.checkFlag) {
+ return
}
uni.request({
- url: that.baseUrl + '/mobile/comb/auth',
+ url: that.baseUrl + '/mobile/truss/auth',
data: JSON.stringify({
barcode: that.barcode,
combMats: that.dataList
@@ -453,7 +422,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';
@@ -472,6 +441,50 @@
}
}
});
+ },
+ // 鎻愪氦鏍¢獙
+ combCheck(palletizingNo,boxType,createTime) {
+ 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
@@ -501,6 +514,9 @@
<style>
@import url('../../static/css/wms.css/wms.css');
+ .list:first-child {
+ margin-top: 320rpx;
+ }
.empty-list {
height: 50%;
width: 100%;
@@ -553,7 +569,7 @@
width: 100%;
background-color: white;
position: fixed;
- margin-top: 280rpx;
+ margin-top: 210rpx;
z-index: 9;
/* border-top: 1px solid #DCDFE6; */
text-align: center;
--
Gitblit v1.9.1