From b9e0cd2967f91865ae987707b34fba88dfbc5095 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 19 一月 2024 14:48:26 +0800
Subject: [PATCH] #
---
pages/order/orderPakin2.vue | 86 +++++++++++++++++++++---------------------
1 files changed, 43 insertions(+), 43 deletions(-)
diff --git a/pages/order/orderPakin2.vue b/pages/order/orderPakin2.vue
index f0e819d..347b6a2 100644
--- a/pages/order/orderPakin2.vue
+++ b/pages/order/orderPakin2.vue
@@ -20,7 +20,9 @@
<view class="mat-list-title">
<view class="title-item"></view>
<view class="title-item">鍟嗗搧鍒楄〃</view>
- <view class="title-item"><button size="mini" type="primary" @click="addMat()">娣诲姞</button></view>
+ <view class="title-item">
+ <!-- <button size="mini" type="primary" @click="addMat()">娣诲姞</button> -->
+ </view>
</view>
<u-empty v-show="dataList.length == 0" mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png" style="position:fixed;top: 60%;left: 50%;transform: translate(-50%, -50%);">
@@ -139,11 +141,11 @@
<!-- 寮圭獥閫夋嫨 -->
<uni-popup ref="inputDialog" type="dialog">
<view class="pop">
- <view class="pop-btn" @click="select('1')">
- 1鍙风爜鍨涗綅
+ <view class="pop-btn" @click="select('118')">
+ 118鍙风爜鍨涗綅
</view>
- <view class="pop-btn" @click="select('2')">
- 2鍙风爜鍨涗綅
+ <view class="pop-btn" @click="select('119')">
+ 119鍙风爜鍨涗綅
</view>
</view>
</uni-popup>
@@ -162,7 +164,7 @@
palletizingNo2: '',
boxType: '',
createTime: '',
- dataList: [{}],
+ dataList: [],
count: 0,
rowNum: '',
matnr: '',
@@ -175,6 +177,7 @@
title: '',
content: '',
barcodeFocus: true,
+ orderNoFocus: false,
palletizingNoFocus: false,
palletizingNo2Focus: false,
boxTypeFocus: false,
@@ -194,14 +197,35 @@
findOrder() {
let _this = this
uni.request({
- url: `${_this.baseUrl}/order/search/orderNo/auth/v2`,
- header: { 'token': uni.getStorageSync('token') },
- data: { orderNo: _this.orderNo },
+ url: `${_this.baseUrl}/mobile/order/search/orderNo/auth/v2`,
+ header: {
+ 'token': uni.getStorageSync('token'),
+ 'content-type': 'application/x-www-form-urlencoded'
+ },
+ data: {orderNo: _this.orderNo},
method: 'POST',
- success(res) {
- res = res.data
- if (res.code === 200 && res.data) {
- _this.dataList = res.data
+ success(result) {
+ result = result.data
+ if (result.code === 200 && result.data) {
+ // for(let k of result.data[0].combMats) {
+ // _this.dataList.push(k)
+ // }
+ uni.navigateTo({
+ url: "../order/orderDetls",
+ // 閫氳繃eventChannel鍚戣鎵撳紑椤甸潰浼犻�佹暟鎹�
+ success: function(res) {
+ res.eventChannel.emit('orderDetls', {
+ data: result.data[0].combMats
+ })
+ },
+ // 涓烘寚瀹氫簨浠舵坊鍔犱竴涓洃鍚櫒锛岃幏鍙栬鎵撳紑椤甸潰浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ events: {
+ detl: function(data) {
+ _this.dataList.push(data.data)
+ },
+ },
+ });
+
} else {
uni.showToast({ title: res.msg, icon: "none", position: 'top' })
}
@@ -441,15 +465,16 @@
},
comb() {
let that = this;
- that.combCheck(that.palletizingNo,that.boxType,that.createTime);
+ that.combCheck(that.palletizingNo2,that.boxType,that.createTime);
if (that.checkFlag) {
return
}
uni.request({
- url: that.baseUrl + '/mobile/truss/auth',
+ url: that.baseUrl + '/mobile/truss/order/auth',
data: JSON.stringify({
+ orderNo: that.orderNo,
barcode: that.barcode,
- combMats: that.dataList
+ matList: that.dataList
}),
method: 'POST',
header: {
@@ -461,9 +486,6 @@
that.resst();
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')
@@ -480,8 +502,8 @@
});
},
// 鎻愪氦鏍¢獙
- combCheck(palletizingNo,boxType,createTime) {
- if (palletizingNo === '') {
+ combCheck(palletizingNo2,boxType,createTime) {
+ if (palletizingNo2 === '') {
this.messageText = "璇锋坊鍔犵爜鍨涗綅"
this.messageToggle('error')
this.checkFlag = true;
@@ -493,33 +515,11 @@
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;
},
--
Gitblit v1.9.1