| | |
| | | <view> |
| | | <view class="container"> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>物料编码</text></view> |
| | | <view class="text-title"><text>Item Code</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"><text>Item Name</text></view> |
| | | <view class="text-title">{{matData.maktx}}</view> |
| | | </view> |
| | | <!-- <view class="text-box"> |
| | | <view class="text-title"><text>客户PO</text></view> |
| | | <view class="text-title"><text>Customer PO</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.standby1"></view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>条码UPC</text></view> |
| | | <view class="text-title"><text>Barcode UPC</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.standby2"></view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>客户SKU</text></view> |
| | | <view class="text-title"><text>Customer SKU</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.standby3"></view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>货主名称</text></view> |
| | | <view class="text-title"><text>Owner Name</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.boxType1"></view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>供应商</text></view> |
| | | <view class="text-title"><text>Supplier</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.supp"></view> |
| | | </view> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>采购单号</text></view> |
| | | <view class="text-title"><text>PO Number</text></view> |
| | | <view class="text-title"><input type="text" v-model="matData.boxType3"></view> |
| | | </view> --> |
| | | <view class="text-box"> |
| | | <view class="text-title"><text>备注</text></view> |
| | | <view class="text-title"><text>Remark</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"><text>Quantity</text></view> |
| | | <view class="text-title"> |
| | | <view> |
| | | <uni-number-box :value="matData.anfme" :max="999999999" :step="1" color="#747474" @change="changeValue"/> |
| | |
| | | </view> |
| | | <view class="foot flex justify-center"> |
| | | <label> |
| | | <button class="cu-btn bg-blue" @click="back()">提取</button> |
| | | <button class="cu-btn bg-blue" @click="back()">Extract</button> |
| | | </label> |
| | | </view> |
| | | </scroll-view> |
| | |
| | | endTime: '' |
| | | }, |
| | | commonProps: [ |
| | | '4Ni','6Ni', '8Ni', '10Ni', '镀铬', '本色', |
| | | '镀镍', '电镀', '玫瑰金', 'PVD拉丝金封哑油', 'PVD拉丝镍封哑油', |
| | | '电泳亚黑', '水镀枪灰', '拉丝', '钛金', '亮白', |
| | | '体抛沙铜本色', '抛光', '过砂' |
| | | '4Ni','6Ni', '8Ni', '10Ni', 'Chrome Plating', 'Natural Color', |
| | | 'Nickel Plating', 'Electroplating', 'Rose Gold', 'PVD Brushed Gold Matte Oil', 'PVD Brushed Nickel Matte Oil', |
| | | 'Electrophoresis Matte Black', 'Water Plating Gun Grey', 'Brushed', 'Titanium Gold', 'Bright White', |
| | | 'Body Polished Sand Copper Natural', 'Polished', 'Sanded' |
| | | ], |
| | | selectedIndex: -1, |
| | | startTime: formatTime(now), |
| | |
| | | // #endif |
| | | |
| | | eventChannel.on('matData', function (data) { |
| | | Object.assign(that.matData, data.data); // 保持响应式 |
| | | Object.assign(that.matData, data.data); // Maintain reactivity |
| | | that.matData.anfme = 1; |
| | | |
| | | if (that.matData.proType) { |
| | |
| | | |
| | | validateNumber(field, type) { |
| | | const value = this[type][field]; |
| | | // 只允许输入数字 |
| | | // Only allow numbers |
| | | if (!/^\d*$/.test(value)) { |
| | | this[type][field] = value.replace(/\D/g, ''); // 去除非数字字符 |
| | | this[type][field] = value.replace(/\D/g, ''); // Remove non-numeric characters |
| | | } |
| | | |
| | | let max = 59; // 默认最大值 |
| | | if (field === 'year') max = 9999; // 年最大值为 9999 |
| | | if (field === 'month') max = 12; // 月最大值为 12 |
| | | if (field === 'day') max = 31; // 日最大值为 31 |
| | | if (field === 'hour') max = 23; // 小时最大值为 23 |
| | | if (field === 'minute' || field === 'second') max = 59; // 分钟和秒最大值为 59 |
| | | let max = 59; // Default max value |
| | | if (field === 'year') max = 9999; // Max year is 9999 |
| | | if (field === 'month') max = 12; // Max month is 12 |
| | | if (field === 'day') max = 31; // Max day is 31 |
| | | if (field === 'hour') max = 23; // Max hour is 23 |
| | | if (field === 'minute' || field === 'second') max = 59; // Max minute and second is 59 |
| | | |
| | | // 限制输入范围 |
| | | // Limit input range |
| | | if (parseInt(value, 10) > max) { |
| | | this[type][field] = max.toString(); // 如果超出范围,设置为最大值 |
| | | this[type][field] = max.toString(); // Set to max if out of range |
| | | } |
| | | |
| | | // 自动更新完整时间 |
| | | // Automatically update full date |
| | | this.updateFullDate(type); |
| | | }, |
| | | clearInput(field, type) { |
| | | this[type][field] = ''; // 清空指定字段的值 |
| | | this[type][field] = ''; // Clear value of specified field |
| | | }, |
| | | updateFullDate(type) { |
| | | const timeData = this[type]; |
| | |
| | | }, |
| | | back() { |
| | | if (this.matData.anfme === 0) { |
| | | uni.showToast({ title: '请输入数量', icon: 'none', position: 'top' }); |
| | | uni.showToast({ title: 'Please enter quantity', icon: 'none', position: 'top' }); |
| | | return; |
| | | } |
| | | this.getOpenerEventChannel().emit('matList', { data: this.matData }); |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 0 10rpx; |
| | | /* 统一字体大小,左右内边距,去掉上下内边距确保垂直居中 */ |
| | | /* Unified font size, left/right padding, remove top/bottom padding to ensure vertical centering */ |
| | | } |
| | | |
| | | .picker-box { |
| | | width: 100%; |
| | | /* 让picker内容撑满盒子 */ |
| | | /* Let picker content fill the box */ |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | /* 行高垂直居中 */ |
| | | /* Line height vertical centering */ |
| | | } |
| | | |
| | | input.half-box { |
| | | border: none; |
| | | outline: none; |
| | | /* 去掉input默认边框 */ |
| | | /* Remove default input border */ |
| | | background-color: transparent; |
| | | /* 背景透明,让input背景跟父盒子一致 */ |
| | | /* Transparent background, match input background with parent box */ |
| | | font-size: 24rpx; |
| | | /* 继承字体大小 */ |
| | | /* Inherit font size */ |
| | | height: 60rpx; |
| | | line-height: 60rpx; |
| | | /* 让文字垂直居中 */ |
| | | /* Vertical center text */ |
| | | } |
| | | |
| | | .container { |
| | |
| | | background-color: #ffffff; |
| | | } |
| | | .text-box { |
| | | height: 100rpx; |
| | | line-height: 100rpx; |
| | | min-height: 100rpx; |
| | | margin-top: 20rpx; |
| | | margin-left: 10%; |
| | | width: 80%; |
| | |
| | | font-weight: 400; |
| | | color: #434343; |
| | | border-bottom: 1rpx solid #e8e8e8; |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 10rpx 0; |
| | | } |
| | | .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: 2%; |
| | | width: 72%; |
| | | flex: 1; |
| | | font-size: 30rpx; |
| | | font-weight: 400; |
| | | color: #747474; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | } |
| | | .text-box .text-title:last-child input { |
| | | border-bottom: 1rpx solid #e8e8e8 ; |