From 2a39aa8035613ddcb00ab2edd2d3aea046b0c838 Mon Sep 17 00:00:00 2001
From: Junjie <xjj@123>
Date: 星期六, 14 六月 2025 10:17:14 +0800
Subject: [PATCH] #
---
pages/basics/matQuery.vue | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 173 insertions(+), 0 deletions(-)
diff --git a/pages/basics/matQuery.vue b/pages/basics/matQuery.vue
new file mode 100644
index 0000000..8e5d057
--- /dev/null
+++ b/pages/basics/matQuery.vue
@@ -0,0 +1,173 @@
+<template>
+ <scroll-view scroll-y>
+ <view>
+ <view class="container">
+ <view class="text-box">
+ <view class="text-title"><text>鍝佸彿</text></view>
+ <view class="text-title"><text>{{matData.matnr}}</text></view>
+ </view>
+ <view class="text-box">
+ <view class="text-title"><text>鍝佸悕</text></view>
+ <view class="text-title">{{matData.maktx}}</view>
+ </view>
+ <view class="text-box">
+ <view class="text-title"><text>瑙勬牸</text></view>
+ <view class="text-title">{{matData.specs}}</view>
+ </view>
+ <!-- <view class="text-box">
+ <view class="text-title"><text>宸ュ簭</text></view>
+ <view class="text-title">{{matData.sku}}</view>
+ </view> -->
+ <view class="text-box">
+ <view class="text-title"><text>鎵规</text></view>
+ <view class="text-title"><input type="text" v-model="matData.batch"></view>
+ </view>
+ <!-- <view class="text-box">
+ <view class="text-title"><text>澶囨敞</text></view>
+ <view class="text-title"><input type="text" v-model="matData.memo"></view>
+ </view> -->
+
+ <view class="text-box">
+ <view class="text-title"><text>涓绘暟閲�</text></view>
+ <view class="text-title">
+ <view>
+ <uni-number-box v-model="matData.anfme" :value="matData.anfme" :max="99999999" color="#747474" @change="changeValue"/>
+ </view>
+ </view>
+ </view>
+ <view class="text-box">
+ <view class="text-title"><text>杈呮暟閲�</text></view>
+ <view class="text-title">
+ <view>
+ <uni-number-box v-model="matData.weight" :value="matData.weight" :max="99999999" color="#747474" @change="changeValue2"/>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
+ <view class="foot flex justify-center">
+ <label>
+ <button class="cu-btn bg-blue" @click="back()">鎻愬彇</button>
+ </label>
+ </view>
+ </scroll-view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ matData: {
+ matnr: null,
+ maktx: null,
+ batch: null,
+ anfme: null,
+ anfme2: null,
+ origin: null,
+ },
+ baseIP:'',
+ basePORT:'',
+ }
+ },
+ onLoad(option) {
+ let that = this
+ // #ifdef APP-NVUE
+ const eventChannel = this.$scope.eventChannel; // 鍏煎APP-NVUE
+ // #endif
+ // #ifndef APP-NVUE
+ const eventChannel = this.getOpenerEventChannel();
+ // #endif
+
+ // 鐩戝惉acceptDataFromOpenerPage浜嬩欢锛岃幏鍙栦笂涓�椤甸潰閫氳繃eventChannel浼犻�佸埌褰撳墠椤甸潰鐨勬暟鎹�
+ eventChannel.on('matData', function(data) {
+ that.matData = data.data
+ })
+
+
+ },
+ methods: {
+ blur() {
+
+ },
+ focus() {
+
+ },
+ changeValue(value) {
+ // this.matData.anfme = value
+ },
+ changeValue2(value) {
+ let arr = this.matData.origin.split("/")
+ let mainAnfme = value * parseFloat(arr[1]) * parseFloat(arr[0])
+ this.matData.weight = value
+ this.matData.anfme = mainAnfme
+ },
+ back() {
+ if (this.matData.anfme === 0) {
+ uni.showToast({title: '璇疯緭鍏ユ暟閲�', icon: "none", position: 'top'});
+ return;
+ }
+
+ console.log(this.matData);
+ this.getOpenerEventChannel().emit('matList', {data: this.matData});
+ uni.vibrateShort();
+ uni.navigateBack({
+
+ })
+ }
+ }
+ }
+</script>
+
+<style>
+ .container {
+ width: 100%;
+ height: 100%;
+ background-color: #ffffff;
+ }
+ .text-box {
+ height: 100rpx;
+ line-height: 100rpx;
+ margin-top: 20rpx;
+ margin-left: 10%;
+ width: 80%;
+ font-size: 32rpx;
+ font-weight: 400;
+ color: #434343;
+ border-bottom: 1rpx solid #e8e8e8;
+ }
+ .text-box:last-child {
+ border-bottom: none;
+ }
+ .text-box .text-title {
+ width: 30%;
+ height: 100rpx;
+ float: left;
+ display: inline-block;
+ }
+ .text-box .text-title:last-child {
+ display: inline-block;
+ margin-left: 5%;
+ width: 65%;
+ font-size: 30rpx;
+ font-weight: 400;
+ color: #747474;
+ display: flex;
+ align-items: center;
+ }
+ .text-box .text-title:last-child input {
+ border-bottom: 1rpx solid #e8e8e8 ;
+ width: 100%;
+ }
+
+
+ .foot {
+ width: 100%;
+ height: 100rpx;
+ line-height: 100rpx;
+ background-color: rgba(255,255,255,1);
+ position: fixed;
+ bottom: 0%;
+ border-top: 1px solid #d8d8d8;
+ z-index: 1;
+ }
+</style>
--
Gitblit v1.9.1