From 2a39aa8035613ddcb00ab2edd2d3aea046b0c838 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期六, 14 六月 2025 10:17:14 +0800
Subject: [PATCH] #
---
pages/basics/matSelect.vue | 68 +++++++++++++++++++++-------------
1 files changed, 42 insertions(+), 26 deletions(-)
diff --git a/pages/basics/matSelect.vue b/pages/basics/matSelect.vue
index 5b4d679..7267e48 100644
--- a/pages/basics/matSelect.vue
+++ b/pages/basics/matSelect.vue
@@ -27,10 +27,12 @@
@click="findBySelect(item.matnr)">
<view class="demo-list-right">
<view class="tag">
- <view class="cu-tag bg-cyan ">鍟嗗搧</view>
+ <view class="cu-tag bg-cyan "><strong>鍟嗗搧</strong></view>
</view>
- <view class="matnr"><text style="width: 400rpx;">{{item.matnr}}</text></view>
- <view class="matnr"><text style="width: 400rpx;">{{item.maktx}}</text></view>
+ <view class="matnr" style="font-size: 16px;"><text style="min-width: 400rpx;font-size: 12px;"><strong>鍝佸悕:{{item.maktx}}</strong></text></view>
+ <view class="matnr" style="font-size: 16px;"><text style="min-width: 400rpx;font-size: 12px;"><strong>鍝佸彿:{{item.matnr}}</strong></text></view>
+ <view class="matnr" style="font-size: 16px;"><text style="min-width: 400rpx;font-size: 12px;"><strong>瑙勬牸:{{item.specs}}</strong></text></view>
+ <view class="matnr" style="font-size: 16px;"><text style="min-width: 400rpx;font-size: 12px;"><strong>宸ュ簭:{{item.sku}}</strong></text></view>
</view>
</label>
</checkbox-group>
@@ -42,28 +44,41 @@
export default {
data() {
return {
+ commonUrl:null,
condition:null,
tag: [],
data: [],
- baseHttp:'http://',
- baseIP:'',
- basePORT:'',
- baseUrl:'/jkwms'
}
},
onLoad() {
let that = this
- // const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ // #ifdef APP-NVUE
+ const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ // #endif
+ // #ifndef APP-NVUE
const eventChannel = this.getOpenerEventChannel();
+ // #endif
// 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
- eventChannel.on('acceptDataFromOpenerPage', function(data) {
- that.baseIP = data.baseIP
- that.basePORT = data.basePORT
+ eventChannel.on('commonUrl', function(data) {
that.showTag(1)
})
+
+ },
+ mounted(){
+ const UIP = uni.getStorageSync('UIP');
+ this.baseIP = UIP;
+ const UPORT = uni.getStorageSync('UPORT');
+ this.basePORT = UPORT
+ const PROJ = uni.getStorageSync('UPROJ');
+ this.baseUrl = PROJ
+ this.getUrl()
},
methods: {
+ // 鑾峰彇url
+ getUrl() {
+ this.commonUrl = this.baseHttp + this.baseIP + ':' +this.basePORT + "/" +this.baseUrl
+ },
checkbox() {
},
@@ -81,7 +96,7 @@
});
uni.request({
// url: "http://localhost:8081/jkwms/tag/list/pda/auth",
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/search/pda/auth',
+ url: that.commonUrl + '/mat/search/pda/auth',
data: {
condition: condition
},
@@ -106,24 +121,25 @@
}
}
});
+
},
showTag(parentId) {
let that = this
- uni.vibrateShort();
uni.showLoading();
uni.request({
- // url: "http://localhost:8081/jkwms/tag/list/pda/auth",
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/tag/list/pda/auth',
+ url: that.commonUrl + '/tag/list/pda/auth',
+ header: {
+ 'token':uni.getStorageSync('token'),
+ },
data: {
limit: 100000,
parentId: parentId
},
- method:"GET",
- header: {
+ header: {
'token':uni.getStorageSync('token'),
- },
+ },
success(result) {
-
+ console.log(result)
that.tag = null
that.data = null
var res = result.data
@@ -153,10 +169,8 @@
if (tagId == null || tagId == '' || tagId == undefined) {
return;
}
- uni.showLoading();
uni.request({
- // url: "http://localhost:8081/jkwms/mat/list/pda/auth",
- url: that.baseHttp + that.baseIP + ':' +that.basePORT + that.baseUrl + '/mat/list/pda/auth',
+ url: that.commonUrl + '/mat/list/pda/auth',
data: {
tagId: tagId
},
@@ -165,11 +179,14 @@
'token':uni.getStorageSync('token'),
},
success(result) {
+ console.log(result)
that.tag = null
var res = result.data
if (res.code === 200) {
if (res.data != null && res.data.length > 0) {
+ uni.showLoading();
that.data = res.data
+ uni.hideLoading();
} else {
// that.tagId = parentId
}
@@ -183,7 +200,7 @@
} else {
uni.showToast({title: res.msg, icon: "none",position: 'top'})
}
- uni.hideLoading();
+
}
});
},
@@ -201,8 +218,7 @@
<style>
.matnr {
- margin-left: 60rpx;
- margin-top: 20rpx;
+ margin: 10rpx auto 10rpx 60rpx;
}
.matnr:last-child {
margin-top: 0rpx;
@@ -284,7 +300,7 @@
}
.demo-list {
border-bottom: 1px solid #d8d8d8;
- height: 180rpx;
+ height: 260rpx;
margin: 15rpx;
border-radius: 20rpx;
}
--
Gitblit v1.9.1