From 70acfdf2bb1afb2708fc7fd3e7e9ee2f8374e607 Mon Sep 17 00:00:00 2001
From: whycq <whycq>
Date: 星期五, 18 二月 2022 13:56:27 +0800
Subject: [PATCH] #
---
pages/basics/comb.vue | 38 ++++++++++++++++++++------------------
1 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/pages/basics/comb.vue b/pages/basics/comb.vue
index 5134fac..d5b84aa 100644
--- a/pages/basics/comb.vue
+++ b/pages/basics/comb.vue
@@ -12,7 +12,7 @@
<uni-table border stripe emptyText="鏆傛棤鏇村鏁版嵁">
<uni-tr>
<uni-th width="50">鏁伴噺</uni-th>
- <uni-th width="100">浜у搧浠e彿</uni-th>
+ <uni-th width="100">浜у搧ID</uni-th>
<uni-th width="100">浜у搧鍚嶇О</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in matData" :key="index" @input="tabRender()">
@@ -24,8 +24,8 @@
</view>
<view>
- <button class="cu-btn bg-yellow pda-btn" @click="comb()">缁勬墭</button>
- <button class="cu-btn bg-grey pda-btn" @click="reset">閲嶇疆</button>
+ <button class="cu-btn bg-yellow pda-btn" @click="comb()">缁� 鎵�</button>
+ <button class="cu-btn bg-grey pda-btn" @click="reset">閲� 缃�</button>
</view>
<view>
<!-- 鏅�氬脊绐� -->
@@ -113,24 +113,22 @@
// 鏍规嵁浜у搧浠e彿鏌ヨ浜у搧璇︽儏
find(){
let that = this
- console.log(that.matNo)
let thatId = that.matNo
if(that.matNo.length===0){
- console.log(1)
return;
}
uni.request({
- url:that.baseUrl+"/matCode/auth",
+ url: that.baseUrl + "/matCode/auth",
+
header:{
'content-type':'application/x-www-form-urlencoded',
- 'token':localStorage.getItem('token'),
- },
+ 'token':uni.getStorageSync('token')
+ },
data:{
id:thatId
},
method:'POST',
success:function(res){
- console.log(res)
let data = res.data.data
if(res.data.code === 200){
@@ -156,20 +154,17 @@
matName:that.matName,
count:that.count
}
- that.addTbaleData(data)
+ that.addTableData(data)
},
// 娣诲姞琛ㄦ牸鏁版嵁
- addTbaleData(data){
- console.log(data.matName)
+ addTableData(data){
if(data.matName===''){
-
this.messageToggle('error')
return
}
this.$refs.popup.close()
- console.log(this.matData.length)
for(var i=0;i<this.matData.length;i++){
if(data.matNo === this.matData[i].matNo){
this.matData[i].count = Number(this.matData[i].count) + Number(data.count);
@@ -202,7 +197,6 @@
let that = this
let barcode = that.code
if(barcode.length === 0){
- console.log(1)
that.messageToggle('error')
that.messageText = '鎵樼洏鏉$爜涓虹┖'
return;
@@ -219,15 +213,23 @@
}
uni.request({
- url:that.baseUrl+"/mobile/comb/auth",
- header:{'token':localStorage.getItem('token')},
+ url: that.baseUrl + "/mobile/comb/auth",
+ header:{
+ // #ifdef H5
+ 'token':uni.getStorageSync('token')
+ // #endif
+
+ // #ifdef APP-PLUS
+ 'token': uni.getStorageSync('token')
+ // Authorization:uni.getStorageSync('token')
+ // #endif
+ },
data:{
barcode:barcode,
combMats:that.matData
},
method:'POST',
success:function(res){
- console.log(res)
if(res.data.code===200){
that.reset()
that.messageToggle('success')
--
Gitblit v1.9.1