| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="ProjectRootManager"> |
| | | <component name="KubernetesApiProvider">{}</component> |
| | | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| | | <output url="file://$PROJECT_DIR$/out" /> |
| | | </component> |
| | | </project> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="VcsDirectoryMappings"> |
| | | <mapping directory="$PROJECT_DIR$" vcs="Git" /> |
| | | <mapping directory="" vcs="Git" /> |
| | | </component> |
| | | </project> |
| | |
| | | { |
| | | "path": "pages/pakin/pakin", |
| | | "style": { |
| | | // "navigationBarTitleText": "组 托" |
| | | "navigationStyle": "custom" |
| | | "navigationBarTitleText": "组 托" |
| | | // "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "path" : "pages/order/orderPakin2", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText" : "订单组托", |
| | | "enablePullDownRefresh" : false |
| | | "navigationBarTitleText" : "订单组托" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "path" : "pages/order/orderComb", |
| | | "style" : |
| | | { |
| | | // "navigationBarTitleText" : "订单组托", |
| | | "navigationBarTitleText" : "订单组托" |
| | | // "enablePullDownRefresh" : false |
| | | "navigationStyle": "custom" |
| | | } |
| | | }, |
| | | { |
| | |
| | | "enablePullDownRefresh": false |
| | | } |
| | | |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/order/callReqOutbound", |
| | | "style": { |
| | | "navigationBarTitleText": "领料出库" |
| | | } |
| | | }, |
| | | { |
| | | "path": "pages/order/callOutboundDetl/callOutboundDetl", |
| | | "style": { |
| | | "navigationBarTitleText": "出库单据" |
| | | } |
| | | } |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | |
| | | color: 'cyan', |
| | | cuIcon: 'pullup', |
| | | url: '/pakin/pakin' |
| | | }, |
| | | }, |
| | | { |
| | | title: '订单组托', |
| | | name: 'orderComb', |
| | | color: 'olive', |
| | | cuIcon: 'pulldown', |
| | | url: '/order/orderComb' |
| | | }, |
| | | { |
| | | title: '领料出库', |
| | | name: 'callReqOutbound', |
| | | color: 'orange', |
| | | cuIcon: 'pullup', |
| | | url: '/order/callReqOutbound' |
| | | }, |
| | | // { |
| | | // title: '呼叫空托', |
| | |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | ::v-deep .uni-nav-bar-text{ |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | |
| | | <template> |
| | | <view> |
| | | <view class="form"> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>商品编码</text></view> |
| | | <view class="form-item-content"><text>{{mat.matnr}}</text></view> |
| | | <view class="container"> |
| | | <!-- 标题栏 --> |
| | | <view class="status_bar"></view> |
| | | <uni-nav-bar background-color="#ffffff" title="物料详情" @clickLeft="back" :fixed="true" |
| | | :border="false" left-icon="left" :shadow="true"> |
| | | </uni-nav-bar> |
| | | |
| | | <!-- 物料信息卡片 --> |
| | | <view class="info-card"> |
| | | <view class="card-header"> |
| | | <view class="header-icon"> |
| | | <uni-icons type="shop" size="24" color="#409EFF"></uni-icons> |
| | | </view> |
| | | <text class="header-title">物料信息</text> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>商品名称</text></view> |
| | | <view class="form-item-content"><text style="word-wrap:break-word">{{mat.maktx}}</text></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>规格</text></view> |
| | | <view class="form-item-content"><text>{{mat.specs}}</text></view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>批号</text></view> |
| | | <view class="form-item-content"> |
| | | <view class="form-input"> |
| | | <input type="text" v-model="mat.batch"> |
| | | |
| | | <view class="info-list"> |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="scan" size="16" color="#909399"></uni-icons> |
| | | <text>商品编码</text> |
| | | </view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-primary">{{mat.matnr || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="document" size="16" color="#909399"></uni-icons> |
| | | <text>商品工单</text> |
| | | </view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-info">{{mat.standby1 || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="folder" size="16" color="#909399"></uni-icons> |
| | | <text>商品组织</text> |
| | | </view> |
| | | <view class="info-value"> |
| | | <text>{{mat.matOrigin || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="shop" size="16" color="#909399"></uni-icons> |
| | | <text>商品名称</text> |
| | | </view> |
| | | <view class="info-value"> |
| | | <text class="product-name">{{mat.maktx || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="gear" size="16" color="#909399"></uni-icons> |
| | | <text>规格</text> |
| | | </view> |
| | | <view class="info-value"> |
| | | <text>{{mat.specs || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="flag" size="16" color="#909399"></uni-icons> |
| | | <text>批号</text> |
| | | </view> |
| | | <view class="info-value"> |
| | | <input class="batch-input" type="text" v-model="mat.batch" placeholder="选填" placeholder-class="placeholder-style"> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="info-row"> |
| | | <view class="info-label"> |
| | | <uni-icons type="calculator" size="16" color="#909399"></uni-icons> |
| | | <text>数量</text> |
| | | </view> |
| | | <view class="info-value number-box-wrapper"> |
| | | <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#409EFF" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="form-item-desc"><text>数量</text></view> |
| | | <view class="form-item-content"> |
| | | <uni-number-box :value="mat.anfme" :max="99999999" :step='1' color="#747474" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" type="primary" @click="back()">提取</button> |
| | | <view class="bottom-bar"> |
| | | <button class="btn-submit" size="default" type="primary" @click="back()"> |
| | | <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons> |
| | | <text>确认提取</text> |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | data() { |
| | | return { |
| | | mat: { |
| | | standby1: null, |
| | | matOrigin: null, |
| | | matnr: null, |
| | | maktx: null, |
| | | specs: null, |
| | | batch: null, |
| | | anfme: 1, |
| | | }, |
| | | baseIP:'', |
| | | basePORT:'', |
| | | baseIP: '', |
| | | basePORT: '', |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | // #endif |
| | | |
| | | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | // 监听事件,获取上一页面通过eventChannel传送到当前页面的数据 |
| | | eventChannel.on('mat', function(data) { |
| | | that.mat = data.data |
| | | that.mat.anfme = 1 |
| | | if (data.matOrigin) { |
| | | that.mat.matOrigin = data.matOrigin |
| | | } |
| | | if (data.standby1) { |
| | | that.mat.standby1 = data.standby1 |
| | | } |
| | | }) |
| | | |
| | | |
| | | }, |
| | | methods: { |
| | | blur() { |
| | | |
| | | }, |
| | | focus() { |
| | | |
| | | }, |
| | | changeValue(value) { |
| | | this.mat.anfme = value |
| | | }, |
| | | back() { |
| | | // 只验证数量,不验证批号 |
| | | if (this.mat.anfme === 0) { |
| | | uni.showToast({title: '请输入数量', icon: "none", position: 'top'}); |
| | | uni.showToast({ |
| | | title: '请输入数量', |
| | | icon: "none", |
| | | position: 'top' |
| | | }); |
| | | return; |
| | | } |
| | | this.getOpenerEventChannel().emit('matList', {data: this.mat}); |
| | | uni.navigateBack({ |
| | | |
| | | }) |
| | | |
| | | // 批号为空时使用默认值,或者直接传递空值 |
| | | if (!this.mat.batch) { |
| | | this.mat.batch = '' // 或者可以设置默认值,如:this.mat.batch = '无' |
| | | } |
| | | |
| | | this.getOpenerEventChannel().emit('matList', { |
| | | data: this.mat, |
| | | shouldClear: true |
| | | }); |
| | | uni.navigateBack() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | .form { |
| | | min-height: 80rpx; |
| | | background-color: #FFF; |
| | | margin-top: 10px; |
| | | color: #606266; |
| | | box-shadow: 0px 0px 50px 0px rgba(0,0,0,0.2) ; |
| | | } |
| | | .form-item { |
| | | min-height: 100rpx; |
| | | line-height: 1.3; |
| | | border-bottom: 1px solid #DCDFE6; |
| | | margin-left: 40rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | word-wrap: break-word; |
| | | } |
| | | .form-item-desc { |
| | | width: 30%; |
| | | } |
| | | .form-item-content { |
| | | width: 60%; |
| | | } |
| | | |
| | | .form-item:last-child { |
| | | border: none; |
| | | } |
| | | .form-input { |
| | | display: flex; |
| | | align-items: center; |
| | | width: 50vw; |
| | | height: 50rpx; |
| | | padding: 2px 5px; |
| | | border-bottom: 1px solid #E4E7ED; |
| | | border-radius: 5rpx; |
| | | } |
| | | .form-input input{ |
| | | color: #606266; |
| | | } |
| | | <style scoped> |
| | | /* 全局样式 */ |
| | | .container { |
| | | min-height: 100vh; |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | /* 信息卡片 */ |
| | | .info-card { |
| | | background: #ffffff; |
| | | margin: 24rpx; |
| | | border-radius: 24rpx; |
| | | overflow: hidden; |
| | | box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .card-header { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 32rpx 32rpx 20rpx 32rpx; |
| | | border-bottom: 2rpx solid #f5f7fa; |
| | | } |
| | | |
| | | .header-icon { |
| | | width: 48rpx; |
| | | height: 48rpx; |
| | | background: linear-gradient(135deg, #ecf5ff 0%, #d9ecff 100%); |
| | | border-radius: 16rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | margin-right: 16rpx; |
| | | } |
| | | |
| | | .header-title { |
| | | font-size: 32rpx; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | /* 信息列表 */ |
| | | .info-list { |
| | | padding: 16rpx 0; |
| | | } |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 24rpx 32rpx; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | } |
| | | |
| | | .info-row:last-child { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .info-label { |
| | | width: 160rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12rpx; |
| | | font-size: 28rpx; |
| | | color: #909399; |
| | | } |
| | | |
| | | .info-value { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #303133; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | /* 标签样式 */ |
| | | .tag { |
| | | display: inline-block; |
| | | padding: 8rpx 20rpx; |
| | | border-radius: 8rpx; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .tag-primary { |
| | | background: #ecf5ff; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | .tag-info { |
| | | background: #f0f9ff; |
| | | color: #67C23A; |
| | | } |
| | | |
| | | /* 商品名称 */ |
| | | .product-name { |
| | | font-weight: 500; |
| | | color: #303133; |
| | | line-height: 1.4; |
| | | } |
| | | |
| | | /* 批号输入框 */ |
| | | .batch-input { |
| | | background: #f5f7fa; |
| | | padding: 16rpx 20rpx; |
| | | border-radius: 12rpx; |
| | | font-size: 28rpx; |
| | | color: #303133; |
| | | width: 100%; |
| | | } |
| | | |
| | | .batch-input:focus { |
| | | background: #ffffff; |
| | | box-shadow: 0 0 0 2rpx #409EFF; |
| | | } |
| | | |
| | | .placeholder-style { |
| | | color: #c0c4cc; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | /* 数量选择器 */ |
| | | .number-box-wrapper { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | /* 底部按钮 */ |
| | | .bottom-bar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | padding: 20rpx 32rpx; |
| | | padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); |
| | | background: #ffffff; |
| | | box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | z-index: 20; |
| | | } |
| | | |
| | | .btn-submit { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 12rpx; |
| | | height: 88rpx; |
| | | border-radius: 48rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | border: none; |
| | | box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .btn-submit:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3); |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="订单组托" @clickLeft="back" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{store}}</text> |
| | | </view> |
| | | <view class="container"> |
| | | |
| | | <!-- 输入卡片 --> |
| | | <view class="input-card"> |
| | | <view class="input-group"> |
| | | <view class="input-label"> |
| | | <uni-icons type="scan" size="20" color="#409EFF"></uni-icons> |
| | | <text class="label-text">托盘码</text> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | <input class="input-field" type="text" placeholder="请扫描或输入托盘码" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()" placeholder-class="placeholder-style"> |
| | | </view> |
| | | <!-- <view class="item"> |
| | | <view class="code-decs">订单号:</view> |
| | | <uni-combox :candidates="orderNoList" placeholder="请选择订单" v-model="orderNo" @input="getOrderDet"></uni-combox> |
| | | </view> --> |
| | | </view> |
| | | <view class="mat-list-title"> |
| | | <view style="width: 200rpx;"></view> |
| | | <view style="-webkit-flex: 1;flex: 1;">商品列表</view> |
| | | <view style="width: 200rpx;"><button size="mini" type="primary" @click="getChecked">提取</button></view> |
| | | |
| | | <!-- 列表头部 --> |
| | | <view class="list-header"> |
| | | <view class="header-left"> |
| | | <uni-icons type="list" size="20" color="#409EFF"></uni-icons> |
| | | <text class="header-title">商品列表</text> |
| | | </view> |
| | | <view class="header-right"> |
| | | <text class="count-badge">{{dataList.length}}</text> |
| | | <text class="count-text">个商品</text> |
| | | <button class="extract-btn" size="mini" type="primary" @click="getChecked"> |
| | | <uni-icons type="plus" size="14" color="#ffffff"></uni-icons> |
| | | <text>提取</text> |
| | | </button> |
| | | </view> |
| | | </view> |
| | | <scroll-view> |
| | | <checkbox-group class="list" v-for="(item,i) in dataList" :key="i" @change="checkboxChange"> |
| | | <view class="list-left" style="margin: 0;"> |
| | | <view class="list-left-item"> |
| | | <view class="desc">No:{{i + 1}}</view> |
| | | |
| | | <!-- 商品列表 --> |
| | | <scroll-view class="scroll-area" scroll-y :show-scrollbar="false"> |
| | | <view class="product-list"> |
| | | <view class="product-card" v-for="(item,i) in dataList" :key="i"> |
| | | <view class="card-header"> |
| | | <view class="card-number"> |
| | | <text class="number-icon">#</text> |
| | | <text class="number-text">{{i + 1}}</text> |
| | | </view> |
| | | <view class="card-actions"> |
| | | <view class="action-btn edit" @click="revise(item,i)"> |
| | | <uni-icons type="compose" color="#67C23A" size="20"></uni-icons> |
| | | </view> |
| | | <view class="action-btn delete" @click="remove(item,i,'warn')"> |
| | | <uni-icons type="trash" color="#F56C6C" size="20"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">订单号:{{item.orderNo}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">料号:{{item.matnr}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">批号:{{item.batch}}</view> |
| | | </view> |
| | | <view class="list-left-item" > |
| | | <view class="desc">数量:{{item.anfme}}</view> |
| | | |
| | | <view class="card-body"> |
| | | <view class="info-row"> |
| | | <view class="info-label">订单号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-info">{{item.orderNo || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">料号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-primary">{{item.matnr || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">批号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-warning">{{item.batch || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">数量:</view> |
| | | <view class="info-value"> |
| | | <text class="quantity-text">{{item.anfme}}</text> |
| | | <text class="unit-text">个</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list-right"> |
| | | <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> |
| | | <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> |
| | | |
| | | <!-- 空状态 --> |
| | | <view v-if="dataList.length === 0" class="empty-state"> |
| | | <uni-icons type="cart" size="80" color="#e4e7ed"></uni-icons> |
| | | <text class="empty-text">暂无商品,请点击提取添加</text> |
| | | </view> |
| | | </checkbox-group> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" @click="reset('warn')">重置</button> |
| | | <button size="mini" type="primary" @click="combConfirm('warn')">组托</button> |
| | | <view class="bottom-bar"> |
| | | <button class="btn-reset" size="default" @click="reset('warn')"> |
| | | <uni-icons type="refresh" size="18" color="#909399"></uni-icons> |
| | | <text>重置</text> |
| | | </button> |
| | | <button class="btn-submit" size="default" type="primary" @click="combConfirm('warn')"> |
| | | <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons> |
| | | <text>确认组托</text> |
| | | </button> |
| | | </view> |
| | | <!-- 弹窗 --> |
| | | <!-- 修改数量 --> |
| | | |
| | | <!-- 弹窗:修改数量 --> |
| | | <view> |
| | | <uni-popup ref="revise" type="dialog"> |
| | | <view class="popup"> |
| | | <!-- 标题 --> |
| | | <view class="title">修改</view> |
| | | <view class="title">修改商品信息</view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">料号:</view> |
| | | <view class="popup-item-right"> |
| | | <input type="text" v-model="matnr1" disabled="true" |
| | | style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;"> |
| | | <input type="text" v-model="matnr1" disabled="true" class="disabled-input"> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="popup-item"> |
| | | <view class="popup-item-left">批号:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="batch"></view> |
| | | </view> --> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">重量:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="weight"></view> |
| | | <view class="popup-item-right"> |
| | | <input type="text" v-model="weight" class="popup-input" placeholder="请输入重量"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | | <uni-number-box :value="count" :step='1' :max="maxCount" color="#747474" |
| | | @change="changeValue" /> |
| | | <view class="popup-item-right number-box"> |
| | | <uni-number-box :value="count" :step='1' :max="maxCount" color="#409EFF" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn-left" @click="reviseClose">取消</view> |
| | | <view class="btn-right" @click="reviseConfirm()">修改</view> |
| | | <view class="btn-right" @click="reviseConfirm()">确认修改</view> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 移除确认 --> |
| | | |
| | | <!-- 其他弹窗 --> |
| | | <view> |
| | | <!-- 提示窗示例 --> |
| | | <uni-popup ref="alertDialog" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" confirmText="移除" :title="title" :content="content" |
| | | @confirm="removeConfirm" @close="removeClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | |
| | | <view> |
| | | <!-- 提示信息弹窗 --> |
| | | <uni-popup ref="message" type="message"> |
| | | <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 确认组托 --> |
| | | |
| | | <view> |
| | | <uni-popup ref="combConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 确认重置 --> |
| | | |
| | | <view> |
| | | <uni-popup ref="resetConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="resetConfirm" @close="resetClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <view> |
| | | <!-- 提示信息弹窗 --> |
| | | <uni-popup ref="message" type="message"> |
| | | <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> |
| | | </uni-popup> |
| | | </view> |
| | | </view> |
| | |
| | | this.msgType1 = type |
| | | this.$refs.message.open() |
| | | }, |
| | | // barcode input 事件 |
| | | barcodeInput() { |
| | | // 不设置定时器 会出现扫入的字符串不全 |
| | | setTimeout(() => { |
| | | var len = this.barcode.length |
| | | this.focuss() |
| | | }, 200) |
| | | }, |
| | | // 托盘码有误重置 |
| | | barcodeFocuss() { |
| | | let that = this; |
| | | that.barcodeFocus = false; |
| | |
| | | that.barcodeFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 商品光标清空重置 |
| | | focuss() { |
| | | setTimeout(() => { |
| | | this.matnr = ''; |
| | | this.matFocus = true; |
| | | }, 100); |
| | | }, |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | var matnr = that.matnr.split(";") |
| | |
| | | result.data.batch = matnr[2] |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function(res) { |
| | | res.eventChannel.emit('mat', { |
| | | data: result.data |
| | | }) |
| | | }, |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | events: { |
| | | matList: function(data) { |
| | | that.checkMat(data.data) |
| | |
| | | position: 'top' |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | checkMat(mat) { |
| | | mat['orderNo'] = this.order |
| | |
| | | sameItem = true |
| | | } |
| | | } |
| | | // 相同物料 不同批号 新加列表 |
| | | if (mat.batch != this.dataList[i].batch) { |
| | | this.$forceUpdate() // 强制刷新 |
| | | this.$forceUpdate() |
| | | if (sameItem) { |
| | | add = false |
| | | } else { |
| | | add = true |
| | | } |
| | | |
| | | } else { |
| | | // 相同物料相同批号 数量累加 |
| | | this.dataList[i].anfme += mat.anfme |
| | | this.$forceUpdate() // 强制刷新 |
| | | this.$forceUpdate() |
| | | add = false |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | if (add) { |
| | | this.dataList.unshift(mat) |
| | |
| | | this.content = '是否重置!' |
| | | this.$refs.resetConfirm.open() |
| | | }, |
| | | // 确认重置 |
| | | resetConfirm() { |
| | | this.dataList = [] |
| | | this.orderNo = '' |
| | | this.barcode = '' |
| | | uni.showToast({ title:"重置完成", icon: "success", position: 'center' }) |
| | | }, |
| | | // 取消重置 |
| | | resetClose() { |
| | | |
| | | }, |
| | | // 修改批号 |
| | | resetClose() {}, |
| | | revise(item, i) { |
| | | this.matnr1 = this.dataList[i].matnr |
| | | this.count = this.dataList[i].anfme |
| | |
| | | this.type = type |
| | | this.$refs.revise.open(type) |
| | | }, |
| | | // 列表移除按钮 |
| | | remove(item, i, type) { |
| | | this.removeNum = i |
| | | this.msgType = type |
| | |
| | | this.content = '是否移除当前商品!' |
| | | this.$refs.alertDialog.open(i) |
| | | }, |
| | | // 确认移除 |
| | | removeConfirm(i) { |
| | | uni.showToast({ title:"移除成功", icon: "success", position: 'center' }) |
| | | this.dataList.splice(this.removeNum, 1) |
| | |
| | | this.dataList[this.rowNum].weight = this.weight |
| | | uni.showToast({ title:"修改成功", icon: "success", position: 'center' }) |
| | | this.$refs.revise.close() |
| | | this.$forceUpdate() // 强制刷新 |
| | | this.$forceUpdate() |
| | | }, |
| | | reviseClose() { |
| | | this.$refs.revise.close() |
| | |
| | | changeValue(value) { |
| | | this.count = value |
| | | }, |
| | | // 清空 |
| | | resst() { |
| | | this.dataList = [] |
| | | this.barcode = '' |
| | |
| | | combClose() { |
| | | this.$refs.combConfirm.close() |
| | | }, |
| | | // 取消移除 |
| | | removeClose() { |
| | | this.$refs.alertDialog.close() |
| | | }, |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | <style scoped> |
| | | /* 全局样式 */ |
| | | .container { |
| | | min-height: 100vh; |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | .list { |
| | | display: flex; |
| | | min-height: 80rpx; |
| | | background-color: #FFF; |
| | | margin: 20rpx 20rpx; |
| | | border-radius: 20rpx; |
| | | box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.2); |
| | | } |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | .list:first-child { |
| | | margin-top: 240rpx; |
| | | } |
| | | /* 仓库标签 */ |
| | | .store-badge { |
| | | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| | | padding: 8rpx 24rpx; |
| | | border-radius: 40rpx; |
| | | box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); |
| | | } |
| | | |
| | | .list:last-child { |
| | | margin-bottom: 120rpx; |
| | | } |
| | | .uni-nav-bar-text { |
| | | color: #ffffff; |
| | | font-size: 28rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .aside { |
| | | width: 100rpx; |
| | | /* background-color: #303133; */ |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | /* 输入卡片 */ |
| | | .input-card { |
| | | background: #ffffff; |
| | | margin: 24rpx; |
| | | border-radius: 24rpx; |
| | | padding: 16rpx 0; |
| | | box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .code { |
| | | width: 100%; |
| | | position: fixed; |
| | | min-height: 100rpx; |
| | | background-color: #FFF; |
| | | z-index: 10; |
| | | } |
| | | .input-group { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 24rpx 32rpx; |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 100rpx; |
| | | margin-left: 20rpx; |
| | | border-bottom: 1px solid #DCDFE6; |
| | | } |
| | | .input-label { |
| | | display: flex; |
| | | align-items: center; |
| | | width: 140rpx; |
| | | gap: 12rpx; |
| | | } |
| | | |
| | | .item input { |
| | | height: 50rpx; |
| | | line-height: 50rpx; |
| | | /* font-family: PingFang SC; uniapp 默认字体不居中 */ |
| | | font-size: 36upx; |
| | | font-family: PingFang SC; |
| | | width: 55vw; |
| | | .label-text { |
| | | font-size: 30rpx; |
| | | color: #303133; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | } |
| | | .input-field { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #303133; |
| | | padding: 8rpx 0; |
| | | } |
| | | |
| | | .code-decs { |
| | | width: 20vw; |
| | | font-size: 18px; |
| | | color: #303133; |
| | | } |
| | | .placeholder-style { |
| | | color: #c0c4cc; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .item-right { |
| | | margin-left: auto; |
| | | margin-right: 20rpx; |
| | | } |
| | | /* 列表头部 */ |
| | | .list-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 24rpx 32rpx; |
| | | background: #ffffff; |
| | | margin: 0 0 20rpx 0; |
| | | box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03); |
| | | } |
| | | |
| | | .mat-list-title { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 80rpx; |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 100rpx; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | text-align: center; |
| | | box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.5); |
| | | |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12rpx; |
| | | } |
| | | |
| | | } |
| | | .header-title { |
| | | font-size: 32rpx; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | |
| | | .header-right { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 16rpx; |
| | | } |
| | | |
| | | .count-badge { |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | font-size: 24rpx; |
| | | font-weight: 600; |
| | | padding: 4rpx 12rpx; |
| | | border-radius: 24rpx; |
| | | min-width: 40rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | .count-text { |
| | | font-size: 26rpx; |
| | | color: #909399; |
| | | } |
| | | |
| | | .extract-btn { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8rpx; |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | border: none; |
| | | padding: 8rpx 24rpx; |
| | | border-radius: 32rpx; |
| | | font-size: 26rpx; |
| | | height: 56rpx; |
| | | box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.2); |
| | | } |
| | | |
| | | /* 滚动区域 */ |
| | | .scroll-area { |
| | | height: calc(100vh - 420rpx); |
| | | padding: 0 24rpx; |
| | | } |
| | | |
| | | /* 商品卡片 */ |
| | | .product-list { |
| | | padding-bottom: 40rpx; |
| | | } |
| | | |
| | | .product-card { |
| | | background: #ffffff; |
| | | border-radius: 24rpx; |
| | | margin-bottom: 20rpx; |
| | | padding: 24rpx; |
| | | box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .product-card:active { |
| | | transform: scale(0.98); |
| | | } |
| | | |
| | | .card-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 24rpx; |
| | | padding-bottom: 20rpx; |
| | | border-bottom: 2rpx solid #f5f7fa; |
| | | } |
| | | |
| | | .card-number { |
| | | display: flex; |
| | | align-items: baseline; |
| | | gap: 4rpx; |
| | | } |
| | | |
| | | .number-icon { |
| | | font-size: 32rpx; |
| | | font-weight: 700; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | .number-text { |
| | | font-size: 28rpx; |
| | | font-weight: 600; |
| | | color: #606266; |
| | | } |
| | | |
| | | .card-actions { |
| | | display: flex; |
| | | gap: 20rpx; |
| | | } |
| | | |
| | | .action-btn { |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 50%; |
| | | transition: all 0.2s ease; |
| | | } |
| | | |
| | | .action-btn.edit { |
| | | background: #f0f9ff; |
| | | } |
| | | |
| | | .action-btn.edit:active { |
| | | background: #e6f7ff; |
| | | transform: scale(0.95); |
| | | } |
| | | |
| | | .action-btn.delete { |
| | | background: #fef0f0; |
| | | } |
| | | |
| | | .action-btn.delete:active { |
| | | background: #fde2e2; |
| | | transform: scale(0.95); |
| | | } |
| | | |
| | | .card-body { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16rpx; |
| | | } |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .info-label { |
| | | width: 110rpx; |
| | | color: #909399; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .info-value { |
| | | flex: 1; |
| | | color: #606266; |
| | | font-size: 28rpx; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | /* 标签样式 */ |
| | | .tag { |
| | | display: inline-block; |
| | | padding: 6rpx 16rpx; |
| | | border-radius: 8rpx; |
| | | font-size: 24rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .tag-primary { |
| | | background: #ecf5ff; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | .tag-info { |
| | | background: #f0f9ff; |
| | | color: #67C23A; |
| | | } |
| | | |
| | | .tag-warning { |
| | | background: #fdf6ec; |
| | | color: #E6A23C; |
| | | } |
| | | |
| | | .quantity-text { |
| | | font-size: 32rpx; |
| | | font-weight: 600; |
| | | color: #F56C6C; |
| | | } |
| | | |
| | | .unit-text { |
| | | font-size: 24rpx; |
| | | color: #909399; |
| | | margin-left: 8rpx; |
| | | } |
| | | |
| | | /* 空状态 */ |
| | | .empty-state { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 120rpx 0; |
| | | } |
| | | |
| | | .empty-text { |
| | | font-size: 28rpx; |
| | | color: #c0c4cc; |
| | | margin-top: 24rpx; |
| | | } |
| | | |
| | | /* 底部按钮栏 */ |
| | | .bottom-bar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | display: flex; |
| | | gap: 24rpx; |
| | | padding: 20rpx 32rpx; |
| | | padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); |
| | | background: #ffffff; |
| | | box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | z-index: 20; |
| | | } |
| | | |
| | | .btn-reset, |
| | | .btn-submit { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 12rpx; |
| | | height: 88rpx; |
| | | border-radius: 48rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .btn-reset { |
| | | background: #f5f7fa; |
| | | color: #909399; |
| | | border: none; |
| | | } |
| | | |
| | | .btn-reset:active { |
| | | background: #e8eaed; |
| | | transform: scale(0.98); |
| | | } |
| | | |
| | | .btn-submit { |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | border: none; |
| | | box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3); |
| | | } |
| | | |
| | | .btn-submit:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3); |
| | | } |
| | | |
| | | /* 弹窗样式 */ |
| | | .popup { |
| | | width: 600rpx; |
| | | background: #ffffff; |
| | | border-radius: 32rpx; |
| | | padding: 40rpx; |
| | | } |
| | | |
| | | .title { |
| | | font-size: 36rpx; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | text-align: center; |
| | | margin-bottom: 40rpx; |
| | | } |
| | | |
| | | .popup-item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | } |
| | | |
| | | .popup-item-left { |
| | | width: 100rpx; |
| | | font-size: 28rpx; |
| | | color: #606266; |
| | | } |
| | | |
| | | .popup-item-right { |
| | | flex: 1; |
| | | } |
| | | |
| | | .disabled-input { |
| | | background: #f5f7fa; |
| | | padding: 16rpx 20rpx; |
| | | border-radius: 12rpx; |
| | | color: #c0c4cc; |
| | | font-size: 28rpx; |
| | | width: 100%; |
| | | } |
| | | |
| | | .popup-input { |
| | | border: 1px solid #dcdfe6; |
| | | padding: 16rpx 20rpx; |
| | | border-radius: 12rpx; |
| | | font-size: 28rpx; |
| | | background: #ffffff; |
| | | width: 100%; |
| | | } |
| | | |
| | | .number-box { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .btn { |
| | | display: flex; |
| | | gap: 24rpx; |
| | | margin-top: 40rpx; |
| | | } |
| | | |
| | | .btn-left, |
| | | .btn-right { |
| | | flex: 1; |
| | | text-align: center; |
| | | padding: 20rpx 0; |
| | | border-radius: 48rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .btn-left { |
| | | background: #f5f7fa; |
| | | color: #909399; |
| | | } |
| | | |
| | | .btn-right { |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="code"> |
| | | <view style="display: flex;align-items: center;"> |
| | | <view style="width: 70rpx;padding-left: 20rpx;">{{searchType}}</view> |
| | | <view style="flex: 1;margin-left: -8rpx;background-color: white;padding: 4px;margin: 4px;border-radius: 4px;"> |
| | | <!-- <uni-search-bar v-model="searchValue" |
| | | maxlength="500" ancel="cancel" @confirm="getMatList()" @clear="clear" placeholder="输入 / 扫描"> |
| | | </uni-search-bar> --> |
| | | <view class="container"> |
| | | |
| | | <!-- 搜索筛选卡片 --> |
| | | <view class="filter-card"> |
| | | <!-- 订单选择 --> |
| | | <view class="filter-item"> |
| | | <view class="filter-label"> |
| | | <uni-icons type="document" size="18" color="#409EFF"></uni-icons> |
| | | <text>订单号</text> |
| | | </view> |
| | | <view class="filter-input"> |
| | | <uni-combox :candidates="orderNoList" placeholder="请选择订单" v-model="orderNo" @input="getOrderDet"></uni-combox> |
| | | </view> |
| | | </view> |
| | | <view class="code-title"> |
| | | <view style="flex: 1;"></view> |
| | | <view style="width: 100%;text-align: center;margin: 16rpx 0;flex: 1;">{{searchValue}} 总数量:- {{dataList.length}} -</view> |
| | | <view style="flex: 1;display: flex;align-items: center;"><button size="mini" type="primary" @click="allSelect()">{{seltitle}}</button></view> |
| | | |
| | | <!-- 物料编号过滤 --> |
| | | <view class="filter-item"> |
| | | <view class="filter-label"> |
| | | <uni-icons type="scan" size="18" color="#409EFF"></uni-icons> |
| | | <text>物料编号</text> |
| | | </view> |
| | | <view class="filter-input"> |
| | | <input |
| | | type="text" |
| | | v-model="filterMatnr" |
| | | placeholder="输入物料编号过滤" |
| | | @input="onFilterInput" |
| | | class="filter-input-field" |
| | | placeholder-class="placeholder-style" |
| | | /> |
| | | </view> |
| | | <view v-if="filterMatnr" class="filter-clear" @click="clearFilter"> |
| | | <uni-icons type="close" size="18" color="#909399"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 统计和全选栏 --> |
| | | <view class="filter-footer"> |
| | | <view class="stat-info"> |
| | | <uni-icons type="list" size="16" color="#909399"></uni-icons> |
| | | <text>{{filterMatnr ? '过滤结果' : '全部物料'}}:{{filteredList.length}} 条</text> |
| | | </view> |
| | | <view class="select-all-btn" @click="allSelect"> |
| | | <text class="select-all-text">{{seltitle}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="order__list" v-for="(orderDetl,index) in dataList" :key="index"> |
| | | <view class="order__list__left"> |
| | | <view>No:{{index + 1}}</view> |
| | | <view>订单号:{{orderDetl.orderNo}}</view> |
| | | <view>料号:{{orderDetl.matnr}}</view> |
| | | <view>批号:{{orderDetl.batch}}</view> |
| | | <view>可用数量:{{orderDetl.anfme}}</view> |
| | | <!-- 物料列表 --> |
| | | <scroll-view class="scroll-area" scroll-y :show-scrollbar="false"> |
| | | <view class="material-list"> |
| | | <view class="material-card" v-for="(orderDetl,index) in filteredList" :key="index" @click="toggleSelect(orderDetl)"> |
| | | <view class="card-content"> |
| | | <view class="card-info"> |
| | | <view class="info-row"> |
| | | <view class="info-label">序号:</view> |
| | | <view class="info-value"> |
| | | <text class="serial-number">{{index + 1}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">订单号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-info">{{orderDetl.orderNo || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">料号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-primary">{{orderDetl.matnr || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">批号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-warning">{{orderDetl.batch || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">可用数量:</view> |
| | | <view class="info-value"> |
| | | <text class="quantity-text">{{orderDetl.anfme}}</text> |
| | | <text class="unit-text">个</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="card-checkbox"> |
| | | <view class="checkbox-wrapper" :class="{ 'checked': orderDetl.checked }"> |
| | | <uni-icons v-if="orderDetl.checked" type="checkmarkempty" size="20" color="#ffffff"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 空状态 --> |
| | | <view v-if="filteredList.length === 0 && dataList.length > 0" class="empty-state"> |
| | | <uni-icons type="search" size="80" color="#e4e7ed"></uni-icons> |
| | | <text class="empty-text">没有匹配 "{{filterMatnr}}" 的物料</text> |
| | | </view> |
| | | <view v-else-if="dataList.length === 0" class="empty-state"> |
| | | <uni-icons type="document" size="80" color="#e4e7ed"></uni-icons> |
| | | <text class="empty-text">请先选择订单</text> |
| | | </view> |
| | | |
| | | <!-- 底部提示 --> |
| | | <view class="bottom-tip" v-if="filteredList.length > 0"> |
| | | <text>- 已经到底了 -</text> |
| | | </view> |
| | | </view> |
| | | <view class="order__list__right"> |
| | | <!-- <uni-icons type="folder-add" size="25" color="#fff"></uni-icons> --> |
| | | <label @click="checkboxChange(orderDetl)"> |
| | | <checkbox :value="orderDetl.matnr" :checked="orderDetl.checked" style="transform:scale(0.7)" /><text></text> |
| | | </label> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" type="primary" @click="addItems()">提取</button> |
| | | <view class="bottom-bar"> |
| | | <button class="btn-submit" size="default" type="primary" @click="addItems()"> |
| | | <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons> |
| | | <text>提取选中物料</text> |
| | | </button> |
| | | </view> |
| | | <view style="height: 100rpx;width: 100%;text-align: center;line-height: 100rpx;">- 已经到底了 -</view> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | searchType: '订单', |
| | | searchValue: '', |
| | | dataList: [], |
| | | filteredList: [], |
| | | selectedList: [], |
| | | matnr: '', |
| | | orderNo: '', |
| | | orderNoList: [], |
| | | seltitle: '全选' |
| | | seltitle: '全选', |
| | | filterMatnr: '' |
| | | } |
| | | }, |
| | | onShow() { |
| | |
| | | this.getOrderNoList() |
| | | }, |
| | | methods: { |
| | | onFilterInput() { |
| | | this.applyFilter() |
| | | }, |
| | | |
| | | applyFilter() { |
| | | if (!this.filterMatnr || this.filterMatnr.trim() === '') { |
| | | this.filteredList = [...this.dataList] |
| | | } else { |
| | | const keyword = this.filterMatnr.trim().toLowerCase() |
| | | this.filteredList = this.dataList.filter(item => { |
| | | return item.matnr && item.matnr.toLowerCase().includes(keyword) |
| | | }) |
| | | } |
| | | this.updateSelectAllTitle() |
| | | }, |
| | | |
| | | clearFilter() { |
| | | this.filterMatnr = '' |
| | | this.applyFilter() |
| | | }, |
| | | |
| | | updateSelectAllTitle() { |
| | | if (this.filteredList.length === 0) { |
| | | this.seltitle = '全选' |
| | | return |
| | | } |
| | | const allChecked = this.filteredList.every(item => item.checked === true) |
| | | this.seltitle = allChecked ? '取消全选' : '全选' |
| | | }, |
| | | |
| | | toggleSelect(item) { |
| | | this.checkboxChange(item) |
| | | }, |
| | | |
| | | addItems() { |
| | | let pickList = [] |
| | | for (let k of this.dataList) { |
| | |
| | | pickList.push(k) |
| | | } |
| | | } |
| | | if (pickList.length === 0) { |
| | | uni.showToast({ |
| | | title: '请至少选择一个物料', |
| | | icon: "none", |
| | | position: 'center' |
| | | }) |
| | | return |
| | | } |
| | | this.getOpenerEventChannel().emit('pickList', {data: pickList}); |
| | | uni.navigateBack({ |
| | | |
| | | }) |
| | | uni.navigateBack({}) |
| | | }, |
| | | |
| | | checkboxChange(e) { |
| | | let items = this.dataList, |
| | | values = e.matnr; |
| | | if (e.checked) { |
| | | this.$set(e,'checked',false) |
| | | this.$set(e, 'checked', false) |
| | | } else { |
| | | this.$set(e,'checked',true) |
| | | this.$set(e, 'checked', true) |
| | | } |
| | | var count = 0 |
| | | for (let k of items) { |
| | | if (k.checked) { |
| | | count++ |
| | | } |
| | | } |
| | | if (count == items.length && count > 0) { |
| | | this.seltitle = '取消全选' |
| | | } else { |
| | | this.seltitle = '全选' |
| | | } |
| | | this.updateSelectAllTitle() |
| | | }, |
| | | |
| | | allSelect() { |
| | | const targetList = this.filteredList |
| | | if (this.seltitle == '全选') { |
| | | for (let k of this.dataList) { |
| | | for (let k of targetList) { |
| | | k.checked = true |
| | | } |
| | | this.seltitle = '取消全选' |
| | | } else { |
| | | for (let k of this.dataList) { |
| | | for (let k of targetList) { |
| | | k.checked = false |
| | | } |
| | | this.seltitle = '全选' |
| | | } |
| | | |
| | | }, |
| | | |
| | | getOrderDet() { |
| | | let that = this |
| | | uni.request({ |
| | | url: that.baseUrl + '/order/list/orderNo', |
| | | data: {orderNo: that.orderNo} , |
| | | data: {orderNo: that.orderNo}, |
| | | method: 'GET', |
| | | success(res) { |
| | | res = res.data; |
| | | if (res.code === 200) { |
| | | that.dataList = res.data |
| | | for (var i = 0; i < that.dataList.length; i++) { |
| | | that.$set(that.dataList[i],'checked',false) |
| | | that.$set(that.dataList[i], 'checked', false) |
| | | } |
| | | that.filterMatnr = '' |
| | | that.applyFilter() |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getOrderNoList() { |
| | | let that = this |
| | | uni.request({ |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | clear() { |
| | | this.searchValue = '' |
| | | this.getOrderNoList(this.locNo) |
| | | }, |
| | | back() { uni.navigateBack({}) }, |
| | | |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | | |
| | | set(e) { |
| | | var ck = this.dataList[e].checked |
| | | this.dataList[e].checked = ck ? false : true |
| | | this.updateSelectAllTitle() |
| | | }, |
| | | |
| | | getMatList() { |
| | | let that = this |
| | | let searchParam = { |
| | |
| | | ); |
| | | that.dataList = result1 |
| | | that.total = result1.length |
| | | that.applyFilter() |
| | | } else if (res.code == 403) { |
| | | uni.showToast({ title: res.msg, icon: "error", position: 'center' }) |
| | | setTimeout(() => { uni.reLaunch({ url: '../login/login' }); }, 1000); |
| | |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | addItem(mat) { |
| | | this.getOpenerEventChannel().emit('sMat', {data: mat}); |
| | | uni.navigateBack({ |
| | | |
| | | }) |
| | | uni.navigateBack({}) |
| | | } |
| | | }, |
| | | |
| | | watch: { |
| | | filterMatnr() { |
| | | this.applyFilter() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | .code { |
| | | background-color: #d9d9d9; |
| | | z-index: 99; |
| | | position: sticky; |
| | | top: 0rpx; |
| | | left: 0; |
| | | } |
| | | .code-title { |
| | | display: flex; |
| | | } |
| | | .order__list { |
| | | margin: 20rpx; |
| | | font-size: 14px; |
| | | background-color: #fff; |
| | | border-radius: 20rpx; |
| | | border: 1px solid #eeeeee; |
| | | display: flex; |
| | | position: relative; |
| | | background-color: #3eb689; |
| | | color: #FFF; |
| | | } |
| | | .order__list__left { |
| | | flex: 1; |
| | | padding: 20rpx; |
| | | position: relative; |
| | | } |
| | | .order__list__right { |
| | | width: 70rpx; |
| | | border-left: 1px solid #eeeeee; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | </style> |
| | | <style scoped> |
| | | /* 全局样式 */ |
| | | .container { |
| | | min-height: 100vh; |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | /* 筛选卡片 */ |
| | | .filter-card { |
| | | background: #ffffff; |
| | | margin: 24rpx; |
| | | border-radius: 24rpx; |
| | | overflow: hidden; |
| | | box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .filter-item { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 24rpx 32rpx; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | } |
| | | |
| | | .filter-item:last-child { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .filter-label { |
| | | width: 140rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12rpx; |
| | | font-size: 28rpx; |
| | | color: #303133; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .filter-input { |
| | | flex: 1; |
| | | } |
| | | |
| | | .filter-input-field { |
| | | background: #f5f7fa; |
| | | padding: 16rpx 20rpx; |
| | | border-radius: 12rpx; |
| | | font-size: 28rpx; |
| | | color: #303133; |
| | | width: 100%; |
| | | } |
| | | |
| | | .filter-input-field:focus { |
| | | background: #ffffff; |
| | | box-shadow: 0 0 0 2rpx #409EFF; |
| | | } |
| | | |
| | | .filter-clear { |
| | | padding: 0 16rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .placeholder-style { |
| | | color: #c0c4cc; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .filter-footer { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 20rpx 32rpx; |
| | | background: #f8f9fa; |
| | | border-top: 1px solid #f0f0f0; |
| | | } |
| | | |
| | | .stat-info { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8rpx; |
| | | font-size: 26rpx; |
| | | color: #606266; |
| | | } |
| | | |
| | | .select-all-btn { |
| | | padding: 8rpx 24rpx; |
| | | background: #ecf5ff; |
| | | border-radius: 32rpx; |
| | | } |
| | | |
| | | .select-all-text { |
| | | font-size: 26rpx; |
| | | color: #409EFF; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | /* 滚动区域 */ |
| | | .scroll-area { |
| | | height: calc(100vh - 420rpx); |
| | | padding: 0 24rpx; |
| | | } |
| | | |
| | | /* 物料列表 */ |
| | | .material-list { |
| | | padding-bottom: 40rpx; |
| | | } |
| | | |
| | | .material-card { |
| | | background: #ffffff; |
| | | border-radius: 24rpx; |
| | | margin-bottom: 20rpx; |
| | | overflow: hidden; |
| | | box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .material-card:active { |
| | | transform: scale(0.98); |
| | | } |
| | | |
| | | .card-content { |
| | | display: flex; |
| | | padding: 24rpx; |
| | | } |
| | | |
| | | .card-info { |
| | | flex: 1; |
| | | } |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 16rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .info-row:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .info-label { |
| | | width: 140rpx; |
| | | color: #909399; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .info-value { |
| | | flex: 1; |
| | | color: #606266; |
| | | font-size: 28rpx; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | .serial-number { |
| | | color: #409EFF; |
| | | font-weight: 600; |
| | | } |
| | | |
| | | /* 标签样式 */ |
| | | .tag { |
| | | display: inline-block; |
| | | padding: 6rpx 16rpx; |
| | | border-radius: 8rpx; |
| | | font-size: 24rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .tag-primary { |
| | | background: #ecf5ff; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | .tag-info { |
| | | background: #f0f9ff; |
| | | color: #67C23A; |
| | | } |
| | | |
| | | .tag-warning { |
| | | background: #fdf6ec; |
| | | color: #E6A23C; |
| | | } |
| | | |
| | | .quantity-text { |
| | | font-size: 32rpx; |
| | | font-weight: 600; |
| | | color: #F56C6C; |
| | | } |
| | | |
| | | .unit-text { |
| | | font-size: 24rpx; |
| | | color: #909399; |
| | | margin-left: 8rpx; |
| | | } |
| | | |
| | | /* 复选框样式 */ |
| | | .card-checkbox { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding-left: 20rpx; |
| | | margin-left: 20rpx; |
| | | border-left: 2rpx solid #f0f0f0; |
| | | } |
| | | |
| | | .checkbox-wrapper { |
| | | width: 44rpx; |
| | | height: 44rpx; |
| | | border-radius: 50%; |
| | | border: 2rpx solid #dcdfe6; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | transition: all 0.2s ease; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | .checkbox-wrapper.checked { |
| | | background: #409EFF; |
| | | border-color: #409EFF; |
| | | } |
| | | |
| | | /* 空状态 */ |
| | | .empty-state { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 120rpx 0; |
| | | } |
| | | |
| | | .empty-text { |
| | | font-size: 28rpx; |
| | | color: #c0c4cc; |
| | | margin-top: 24rpx; |
| | | } |
| | | |
| | | /* 底部提示 */ |
| | | .bottom-tip { |
| | | text-align: center; |
| | | padding: 40rpx 0; |
| | | color: #c0c4cc; |
| | | font-size: 24rpx; |
| | | } |
| | | |
| | | /* 底部按钮栏 */ |
| | | .bottom-bar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | padding: 20rpx 32rpx; |
| | | padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); |
| | | background: #ffffff; |
| | | box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | z-index: 20; |
| | | } |
| | | |
| | | .btn-submit { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 12rpx; |
| | | height: 88rpx; |
| | | border-radius: 48rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | border: none; |
| | | box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3); |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .btn-submit:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3); |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <view> |
| | | <view class="container"> |
| | | <!-- ----------------------------------------------程序标题栏----------------------------------------------------------- --> |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | <!-- <view class="status_bar"> |
| | | |
| | | </view> |
| | | <uni-nav-bar left-icon="left" background-color="#f8f8f8" title="组托入库" @clickLeft="back" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <uni-nav-bar left-icon="left" background-color="#ffffff" title="组托入库" @clickLeft="back" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" :shadow="true"> |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <view class="store-badge"> |
| | | <text class="uni-nav-bar-text">{{store}}</text> |
| | | </view> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <!-- ----------------------------------------------程序标题栏----------------------------------------------------------- --> |
| | | |
| | | <!-- ---------------------------------------------- 输入框 ----------------------------------------------------------- --> |
| | | <view class="code"> |
| | | <view class="item"> |
| | | <view class="code-decs">托盘码:</view> |
| | | <input type="text" placeholder=" 扫码 / 输入" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()"> |
| | | </uni-nav-bar> --> |
| | | |
| | | <!-- ---------------------------------------------- 输入卡片 ----------------------------------------------------------- --> |
| | | <view class="input-card"> |
| | | <view class="input-group"> |
| | | <view class="input-label"> |
| | | <uni-icons type="scan" size="20" color="#409EFF"></uni-icons> |
| | | <text class="label-text">托盘码</text> |
| | | </view> |
| | | <input class="input-field" type="text" placeholder="请扫描或输入托盘码" v-model="barcode" :focus="barcodeFocus" |
| | | @input="barcodeInput()" placeholder-class="placeholder-style"> |
| | | </view> |
| | | <view class="item"> |
| | | <view class="code-decs">物料码:</view> |
| | | <input type="text" style="width: 350rpx;" placeholder=" 扫码 / 输入" v-model="matnr" :focus="matFocus" @input="findMat()"> |
| | | <uni-icons type="close" color="#c1c1c1" @click="clearMatnr"></uni-icons> |
| | | <view class="item-right"> |
| | | <button></button> |
| | | <text style="text-align: right;color: #409EFF;" @click="selectMat()">提取+</text> |
| | | <uni-icons type="right" color="#c1c1c1"></uni-icons> |
| | | |
| | | <view class="input-group"> |
| | | <view class="input-label"> |
| | | <uni-icons type="shop" size="20" color="#409EFF"></uni-icons> |
| | | <text class="label-text">物料信息</text> |
| | | </view> |
| | | <input class="input-field" type="text" placeholder="请扫描或输入物料码" v-model="matInfo" :focus="matFocus" @input="findMat()" |
| | | placeholder-class="placeholder-style"> |
| | | <view class="input-actions"> |
| | | <uni-icons type="close" color="#c1c1c1" size="20" @click="clearMatnr"></uni-icons> |
| | | <view class="extract-btn" @click="selectMat()"> |
| | | <text class="extract-text">提取</text> |
| | | <uni-icons type="right" color="#409EFF" size="16"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="item"> |
| | | <view class="code-decs" style="width: 25vw;">是否满板:</view> |
| | | <radio-group @change="isFullPlt"> |
| | | <label> |
| | | <radio :checked="ck1" /><text>是</text> |
| | | </label> |
| | | <label> |
| | | <radio :checked="ck2" style="margin-left: 50rpx;"/><text>否</text> |
| | | </label> |
| | | </radio-group> |
| | | </view> --> |
| | | </view> |
| | | <!-- ---------------------------------------------- 输入框 ----------------------------------------------------------- --> |
| | | <view class="mat-list-title"> |
| | | 商品列表 |
| | | |
| | | <!-- ---------------------------------------------- 商品列表标题 ----------------------------------------------------------- --> |
| | | <view class="list-header"> |
| | | <view class="header-left"> |
| | | <uni-icons type="list" size="20" color="#409EFF"></uni-icons> |
| | | <text class="header-title">商品列表</text> |
| | | </view> |
| | | <view class="header-right"> |
| | | <text class="count-badge">{{dataList.length}}</text> |
| | | <text class="count-text">个商品</text> |
| | | </view> |
| | | </view> |
| | | <scroll-view> |
| | | <view class="list" v-for="(item,i) in dataList" :key="i"> |
| | | <view class="list-left"> |
| | | <view class="list-left-item"> |
| | | <view class="desc">No:</view> |
| | | <view class="left-item">{{i + 1}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">编码:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.matnr" type="primary"></uni-tag> |
| | | |
| | | <!-- ---------------------------------------------- 商品列表 ----------------------------------------------------------- --> |
| | | <scroll-view class="scroll-area" scroll-y :show-scrollbar="false"> |
| | | <view class="product-list"> |
| | | <view class="product-card" v-for="(item,i) in dataList" :key="i"> |
| | | <view class="card-header"> |
| | | <view class="card-number"> |
| | | <text class="number-icon">#</text> |
| | | <text class="number-text">{{i + 1}}</text> |
| | | </view> |
| | | <view class="card-actions"> |
| | | <view class="action-btn edit" @click="revise(item,i)"> |
| | | <uni-icons type="compose" color="#67C23A" size="20"></uni-icons> |
| | | </view> |
| | | <view class="action-btn delete" @click="remove(item,i,'warn')"> |
| | | <uni-icons type="trash" color="#F56C6C" size="20"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">品名:</view> |
| | | <view class="left-item">{{item.maktx}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">规格:</view> |
| | | <view class="left-item">{{item.specs}}</view> |
| | | </view> |
| | | <view class="list-left-item"> |
| | | <view class="desc">批号:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.batch" type="warning"></uni-tag> |
| | | |
| | | <view class="card-body"> |
| | | <view class="info-row"> |
| | | <view class="info-label">物料编码:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-primary">{{item.matnr}}</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="list-left-item"> |
| | | <view class="desc">重量:</view> |
| | | <view class="left-item"> |
| | | <uni-tag :text="item.weight" type="warning"></uni-tag> |
| | | <view class="info-row"> |
| | | <view class="info-label">工单号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-info">{{item.standby1 || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | </view> --> |
| | | <view class="list-left-item"> |
| | | <view class="desc">数量:</view> |
| | | <view class="left-item">{{item.anfme}}</view> |
| | | <view class="info-row"> |
| | | <view class="info-label">品名:</view> |
| | | <view class="info-value">{{item.maktx || '-'}}</view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">规格:</view> |
| | | <view class="info-value">{{item.specs || '-'}}</view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">批号:</view> |
| | | <view class="info-value"> |
| | | <text class="tag tag-warning">{{item.batch || '-'}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-label">数量:</view> |
| | | <view class="info-value"> |
| | | <text class="quantity-text">{{item.anfme}}</text> |
| | | <text class="unit-text">个</text> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="list-right"> |
| | | <uni-icons type="compose" color="#9add8b" size="24" @click="revise(item,i)"></uni-icons> |
| | | <uni-icons type="trash" color="#f58a8a" size="24" @click="remove(item,i,'warn')"></uni-icons> |
| | | |
| | | <!-- 空状态 --> |
| | | <view v-if="dataList.length === 0" class="empty-state"> |
| | | <uni-icons type="cart" size="80" color="#e4e7ed"></uni-icons> |
| | | <text class="empty-text">暂无商品,请扫描添加</text> |
| | | </view> |
| | | </view> |
| | | </scroll-view> |
| | | <!-- 底部操作按钮 --> |
| | | <view class="buttom"> |
| | | <button size="mini" @click="reset('warn')">重置</button> |
| | | <button size="mini" type="primary" @click="combConfirm('warn')">组托</button> |
| | | |
| | | <!-- ---------------------------------------------- 底部操作按钮 ----------------------------------------------------------- --> |
| | | <view class="bottom-bar"> |
| | | <button class="btn-reset" size="default" @click="reset('warn')"> |
| | | <uni-icons type="refresh" size="18" color="#909399"></uni-icons> |
| | | <text>重置</text> |
| | | </button> |
| | | <button class="btn-submit" size="default" type="primary" @click="combConfirm('warn')"> |
| | | <uni-icons type="checkmarkempty" size="18" color="#ffffff"></uni-icons> |
| | | <text>确认组托</text> |
| | | </button> |
| | | </view> |
| | | <!-- 弹窗 --> |
| | | |
| | | <!-- ------------------------------ 弹窗保持不变 ------------------------------ --> |
| | | <!-- 修改数量 --> |
| | | <view> |
| | | <uni-popup ref="revise" type="dialog"> |
| | | <view class="popup"> |
| | | <!-- 标题 --> |
| | | <view class="title">修改</view> |
| | | <view class="title">修改商品信息</view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">编码:</view> |
| | | <view class="popup-item-left">物料编码:</view> |
| | | <view class="popup-item-right"> |
| | | <input type="text" v-model="matnr" disabled="true" |
| | | style="background-color: #f7f7f7;padding: 0;color: #d5d5d5;"> |
| | | <input type="text" v-model="matnr" disabled="true" class="disabled-input"> |
| | | </view> |
| | | </view> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">批号:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="batch"></view> |
| | | <view class="popup-item-right"> |
| | | <input type="text" v-model="batch" class="popup-input" placeholder="请输入批号"> |
| | | </view> |
| | | </view> |
| | | <!-- <view class="popup-item"> |
| | | <view class="popup-item-left">重量:</view> |
| | | <view class="popup-item-right"><input type="text" v-model="weight"></view> |
| | | </view> --> |
| | | <view class="popup-item"> |
| | | <view class="popup-item-left">数量:</view> |
| | | <view class="popup-item-right" style="border: none;justify-content: center;"> |
| | | <uni-number-box :value="count" :step='1' :max="9999999" color="#747474" @change="changeValue" /> |
| | | <view class="popup-item-right number-box"> |
| | | <uni-number-box :value="count" :step='1' :max="9999999" color="#409EFF" @change="changeValue" /> |
| | | </view> |
| | | </view> |
| | | <view class="btn"> |
| | | <view class="btn-left" @click="reviseClose">取消</view> |
| | | <view class="btn-right" @click="reviseConfirm()">修改</view> |
| | | <view class="btn-right" @click="reviseConfirm()">确认修改</view> |
| | | </view> |
| | | </view> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 移除确认 --> |
| | | |
| | | <!-- 其他弹窗保持不变 --> |
| | | <view> |
| | | <!-- 提示窗示例 --> |
| | | <uni-popup ref="alertDialog" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" confirmText="移除" :title="title" :content="content" |
| | | @confirm="removeConfirm()" @close="removeClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <view> |
| | | <!-- 提示信息弹窗 --> |
| | | <uni-popup ref="message" type="message"> |
| | | <uni-popup-message :type="msgType1" :message="messageText" :duration="2000"></uni-popup-message> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 确认组托 --> |
| | | <view> |
| | | <uni-popup ref="combConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | | @confirm="comb" @close="combClose"></uni-popup-dialog> |
| | | </uni-popup> |
| | | </view> |
| | | <!-- 确认重置 --> |
| | | <view> |
| | | <uni-popup ref="resetConfirm" type="dialog"> |
| | | <uni-popup-dialog :type="msgType" cancelText="取消" confirmText="确认" :title="title" :content="content" |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | matOrigin: '', |
| | | matOrder: '', |
| | | matInfo: '', |
| | | baseUrl: '', |
| | | token: '', |
| | | storeId: 0, |
| | |
| | | // 搜索物料 |
| | | findMat() { |
| | | let that = this |
| | | |
| | | // 方法1:分割成数组 |
| | | let arr = that.matInfo.split('|') |
| | | // 方法2:遍历每一段 |
| | | arr.forEach((item, index) => { |
| | | switch(index){ |
| | | case 0: that.matOrigin = item |
| | | break; |
| | | case 1: that.matOrder = item |
| | | break; |
| | | case 2: that.matnr = item |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | }) |
| | | uni.request({ |
| | | url: that.baseUrl + '/mat/auth', |
| | | data: { |
| | |
| | | result = result.data |
| | | if (result.code === 200 && result.data) { |
| | | that.matData = result.data |
| | | |
| | | that.matnr = '' |
| | | that.matData['batch'] = '' |
| | | uni.navigateTo({ |
| | | url: "../mat/matSelected", |
| | | // 通过eventChannel向被打开页面传送数据 |
| | | success: function(res) { |
| | | success: function(res) { |
| | | res.eventChannel.emit('mat', { |
| | | data: result.data |
| | | data: result.data, |
| | | matOrigin: that.matOrigin, |
| | | standby1: that.matOrder |
| | | }) |
| | | }, |
| | | }, |
| | | // 为指定事件添加一个监听器,获取被打开页面传送到当前页面的数据 |
| | | events: { |
| | | matList: function(data) { |
| | | that.checkMat(data.data) |
| | | that.checkMat(data.data) |
| | | // ✅ 在这里清空物料信息输入框 |
| | | that.matInfo = '' |
| | | that.focuss() |
| | | }, |
| | | }, |
| | |
| | | comb() { |
| | | uni.vibrateShort(); |
| | | let that = this; |
| | | console.info(that.dataList) |
| | | if (that.barcode === '') { |
| | | uni.showToast({ title: '请扫描托盘条码', icon: "error", position: 'top' }); |
| | | return; |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | page { |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | <style> |
| | | @import url('../../static/css/wms.css/wms.css'); |
| | | .container { |
| | | min-height: 100vh; |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | .list:first-child { |
| | | margin-top: 320rpx; |
| | | .status_bar { |
| | | height: var(--status-bar-height); |
| | | width: 100%; |
| | | background-color: #ffffff; |
| | | } |
| | | |
| | | // 仓库标签 |
| | | .store-badge { |
| | | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| | | padding: 8rpx 24rpx; |
| | | border-radius: 40rpx; |
| | | box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3); |
| | | |
| | | .uni-nav-bar-text { |
| | | color: #ffffff; |
| | | font-size: 28rpx; |
| | | font-weight: 500; |
| | | } |
| | | .code { |
| | | width: 100%; |
| | | position: fixed; |
| | | min-height: 210rpx; |
| | | background-color: #FFF; |
| | | z-index: 10; |
| | | } |
| | | } |
| | | |
| | | .item { |
| | | // 输入卡片 |
| | | .input-card { |
| | | background: #ffffff; |
| | | margin: 20rpx 24rpx; |
| | | border-radius: 24rpx; |
| | | padding: 16rpx 0; |
| | | box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .input-group { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 24rpx 32rpx; |
| | | border-bottom: 1px solid #f0f0f0; |
| | | |
| | | &:last-child { |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .input-label { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 70rpx; |
| | | margin-left: 20rpx; |
| | | border-bottom: 1px solid #DCDFE6; |
| | | width: 160rpx; |
| | | gap: 12rpx; |
| | | |
| | | .label-text { |
| | | font-size: 30rpx; |
| | | color: #303133; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | |
| | | .item input { |
| | | height: 50rpx; |
| | | line-height: 50rpx; |
| | | /* font-family: PingFang SC; uniapp 默认字体不居中 */ |
| | | font-size: 36upx; |
| | | font-family: PingFang SC; |
| | | width: 55vw; |
| | | |
| | | } |
| | | |
| | | .code-decs { |
| | | width: 20vw; |
| | | font-size: 18px; |
| | | |
| | | .input-field { |
| | | flex: 1; |
| | | font-size: 28rpx; |
| | | color: #303133; |
| | | padding: 8rpx 0; |
| | | } |
| | | |
| | | .item-right { |
| | | margin-left: auto; |
| | | margin-right: 20rpx; |
| | | |
| | | .placeholder-style { |
| | | color: #c0c4cc; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .input-actions { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 16rpx; |
| | | margin-left: 16rpx; |
| | | |
| | | .extract-btn { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 4rpx; |
| | | background: #ecf5ff; |
| | | padding: 8rpx 20rpx; |
| | | border-radius: 32rpx; |
| | | |
| | | .extract-text { |
| | | color: #409EFF; |
| | | font-size: 26rpx; |
| | | font-weight: 500; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .mat-list-title { |
| | | height: 80rpx; |
| | | line-height: 80rpx; |
| | | width: 100%; |
| | | background-color: white; |
| | | position: fixed; |
| | | margin-top: 200rpx; |
| | | z-index: 9; |
| | | /* border-top: 1px solid #DCDFE6; */ |
| | | // 列表头部 |
| | | .list-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 24rpx 32rpx; |
| | | background: #ffffff; |
| | | margin-top: 20rpx; |
| | | border-top-left-radius: 24rpx; |
| | | border-top-right-radius: 24rpx; |
| | | |
| | | .header-left { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 12rpx; |
| | | |
| | | .header-title { |
| | | font-size: 32rpx; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | } |
| | | } |
| | | |
| | | .header-right { |
| | | display: flex; |
| | | align-items: center; |
| | | gap: 8rpx; |
| | | |
| | | .count-badge { |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | font-size: 24rpx; |
| | | font-weight: 600; |
| | | padding: 4rpx 12rpx; |
| | | border-radius: 24rpx; |
| | | min-width: 40rpx; |
| | | text-align: center; |
| | | } |
| | | |
| | | .count-text { |
| | | font-size: 26rpx; |
| | | color: #909399; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 滚动区域 |
| | | .scroll-area { |
| | | height: calc(100vh - 520rpx); |
| | | padding: 0 24rpx; |
| | | } |
| | | |
| | | // 商品卡片 |
| | | .product-card { |
| | | background: #ffffff; |
| | | border-radius: 24rpx; |
| | | margin-bottom: 20rpx; |
| | | padding: 24rpx; |
| | | box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04); |
| | | transition: all 0.3s ease; |
| | | |
| | | &:active { |
| | | transform: scale(0.98); |
| | | } |
| | | |
| | | .card-header { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | margin-bottom: 24rpx; |
| | | padding-bottom: 20rpx; |
| | | border-bottom: 2rpx solid #f5f7fa; |
| | | |
| | | .card-number { |
| | | display: flex; |
| | | align-items: baseline; |
| | | gap: 4rpx; |
| | | |
| | | .number-icon { |
| | | font-size: 32rpx; |
| | | font-weight: 700; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | .number-text { |
| | | font-size: 28rpx; |
| | | font-weight: 600; |
| | | color: #606266; |
| | | } |
| | | } |
| | | |
| | | .card-actions { |
| | | display: flex; |
| | | gap: 20rpx; |
| | | |
| | | .action-btn { |
| | | width: 60rpx; |
| | | height: 60rpx; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 50%; |
| | | transition: all 0.2s ease; |
| | | |
| | | &.edit { |
| | | background: #f0f9ff; |
| | | |
| | | &:active { |
| | | background: #e6f7ff; |
| | | transform: scale(0.95); |
| | | } |
| | | } |
| | | |
| | | &.delete { |
| | | background: #fef0f0; |
| | | |
| | | &:active { |
| | | background: #fde2e2; |
| | | transform: scale(0.95); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .card-body { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 16rpx; |
| | | |
| | | .info-row { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | |
| | | .info-label { |
| | | width: 160rpx; |
| | | color: #909399; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | .info-value { |
| | | flex: 1; |
| | | color: #606266; |
| | | font-size: 28rpx; |
| | | word-break: break-all; |
| | | |
| | | .tag { |
| | | display: inline-block; |
| | | padding: 6rpx 16rpx; |
| | | border-radius: 8rpx; |
| | | font-size: 24rpx; |
| | | font-weight: 500; |
| | | |
| | | &-primary { |
| | | background: #ecf5ff; |
| | | color: #409EFF; |
| | | } |
| | | |
| | | &-info { |
| | | background: #f0f9ff; |
| | | color: #67C23A; |
| | | } |
| | | |
| | | &-warning { |
| | | background: #fdf6ec; |
| | | color: #E6A23C; |
| | | } |
| | | } |
| | | |
| | | .quantity-text { |
| | | font-size: 32rpx; |
| | | font-weight: 600; |
| | | color: #F56C6C; |
| | | } |
| | | |
| | | .unit-text { |
| | | font-size: 24rpx; |
| | | color: #909399; |
| | | margin-left: 8rpx; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 空状态 |
| | | .empty-state { |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 120rpx 0; |
| | | |
| | | .empty-text { |
| | | font-size: 28rpx; |
| | | color: #c0c4cc; |
| | | margin-top: 24rpx; |
| | | } |
| | | } |
| | | |
| | | // 底部按钮 |
| | | .bottom-bar { |
| | | position: fixed; |
| | | bottom: 0; |
| | | left: 0; |
| | | right: 0; |
| | | display: flex; |
| | | gap: 24rpx; |
| | | padding: 20rpx 32rpx; |
| | | padding-bottom: calc(20rpx + env(safe-area-inset-bottom)); |
| | | background: #ffffff; |
| | | box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.05); |
| | | z-index: 20; |
| | | |
| | | .btn-reset, |
| | | .btn-submit { |
| | | flex: 1; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 12rpx; |
| | | height: 88rpx; |
| | | border-radius: 48rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | transition: all 0.3s ease; |
| | | } |
| | | |
| | | .btn-reset { |
| | | background: #f5f7fa; |
| | | color: #909399; |
| | | border: none; |
| | | |
| | | &:active { |
| | | background: #e8eaed; |
| | | transform: scale(0.98); |
| | | } |
| | | } |
| | | |
| | | .btn-submit { |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | border: none; |
| | | box-shadow: 0 8rpx 20rpx rgba(64, 158, 255, 0.3); |
| | | |
| | | &:active { |
| | | transform: scale(0.98); |
| | | box-shadow: 0 4rpx 12rpx rgba(64, 158, 255, 0.3); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 弹窗样式 |
| | | .popup { |
| | | width: 600rpx; |
| | | background: #ffffff; |
| | | border-radius: 32rpx; |
| | | padding: 40rpx; |
| | | |
| | | .title { |
| | | font-size: 36rpx; |
| | | font-weight: 600; |
| | | color: #303133; |
| | | text-align: center; |
| | | box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2); |
| | | margin-bottom: 40rpx; |
| | | } |
| | | </style> |
| | | |
| | | .popup-item { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 30rpx; |
| | | |
| | | .popup-item-left { |
| | | width: 140rpx; |
| | | font-size: 28rpx; |
| | | color: #606266; |
| | | } |
| | | |
| | | .popup-item-right { |
| | | flex: 1; |
| | | |
| | | .disabled-input { |
| | | background: #f5f7fa; |
| | | padding: 16rpx 20rpx; |
| | | border-radius: 12rpx; |
| | | color: #c0c4cc; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .popup-input { |
| | | border: 1px solid #dcdfe6; |
| | | padding: 16rpx 20rpx; |
| | | border-radius: 12rpx; |
| | | font-size: 28rpx; |
| | | background: #ffffff; |
| | | } |
| | | |
| | | &.number-box { |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .btn { |
| | | display: flex; |
| | | gap: 24rpx; |
| | | margin-top: 40rpx; |
| | | |
| | | .btn-left, |
| | | .btn-right { |
| | | flex: 1; |
| | | text-align: center; |
| | | padding: 20rpx 0; |
| | | border-radius: 48rpx; |
| | | font-size: 30rpx; |
| | | font-weight: 500; |
| | | } |
| | | |
| | | .btn-left { |
| | | background: #f5f7fa; |
| | | color: #909399; |
| | | } |
| | | |
| | | .btn-right { |
| | | background: linear-gradient(135deg, #409EFF 0%, #66b1ff 100%); |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | | } |
| | | .status_bar{ |
| | | padding-top: 5vh; |
| | | } |
| | | .uni-nav-bar-text { |
| | | font-size: 12px; |
| | | } |