| | |
| | | |
| | | <view v-if="tabs == 2"> |
| | | <view class="list" v-for="(item,index) in Materlist" :key="index"> |
| | | <uni-card :title="item.物料名称" :extra="item.物料代码" style="margin: 10px;" @tap="delMater(item)"> |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>源单数量:</text>{{item.源单数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>数量:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>条码个数:</text>{{item.条码个数}} |
| | | </view> |
| | | <view class="detail" v-if="item.规格型号"> |
| | | <text>规格型号:</text>{{item.规格型号}} |
| | | </view> |
| | | <view class="detail" v-if="item.辅助属性"> |
| | | <text>辅助属性:</text>{{item.辅助属性}} |
| | | </view> |
| | | <view class="detail" v-if="item.款号"> |
| | | <text>款号:</text>{{item.款号}} |
| | | </view> |
| | | <view class="detail" v-if="item.合计数量"> |
| | | <text>合计数量:</text>{{item.合计数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.单价"> |
| | | <text>单价:</text>{{item.单价}} |
| | | </view> |
| | | <view class="detail" v-if="materMeta[0].HWHName && /兴达/.test(hform.HStockOrgName |
| | | )"> |
| | | <text>仓库:</text>{{materMeta[0].HWHName}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | <uni-card :title="item.物料名称" style="margin: 10px;" @tap="delMater(item, $event)"> |
| | | <!-- 物料代码作为可点击链接 --> |
| | | <view class="card-header" @tap.stop="gotoInventoryQuery(item.物料代码)"> |
| | | <text class="link-text">物料代码:{{item.物料代码}}</text> |
| | | </view> |
| | | |
| | | <view class="card-detail"> |
| | | <view class="detail"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>源单数量:</text>{{item.源单数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>数量:</text>{{item.数量}} |
| | | </view> |
| | | <view class="detail"> |
| | | <text>条码个数:</text>{{item.条码个数}} |
| | | </view> |
| | | <view class="detail" v-if="item.规格型号"> |
| | | <text>规格型号:</text>{{item.规格型号}} |
| | | </view> |
| | | <view class="detail" v-if="item.辅助属性"> |
| | | <text>辅助属性:</text>{{item.辅助属性}} |
| | | </view> |
| | | <view class="detail" v-if="item.款号"> |
| | | <text>款号:</text>{{item.款号}} |
| | | </view> |
| | | <view class="detail" v-if="item.合计数量"> |
| | | <text>合计数量:</text>{{item.合计数量}} |
| | | </view> |
| | | <view class="detail" v-if="item.单价"> |
| | | <text>单价:</text>{{item.单价}} |
| | | </view> |
| | | <view class="detail" v-if="materMeta[0].HWHName && /兴达/.test(hform.HStockOrgName)"> |
| | | <text>仓库:</text>{{materMeta[0].HWHName}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view class="over" v-if="Materlist.length == 0">暂无数据</view> |
| | | </view> |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | gotoInventoryQuery(HMaterNumber) { |
| | | console.log('跳转到库存查询,物料代码:', HMaterNumber); |
| | | |
| | | // 使用uni.navigateTo跳转到新页面 |
| | | uni.navigateTo({ |
| | | url: `/pages/jishikucunchaxun/table?OperationType=2&HMaterNumber=${HMaterNumber}`, |
| | | success: (res) => { |
| | | console.log('跳转成功'); |
| | | }, |
| | | fail: (err) => { |
| | | console.error('跳转失败:', err); |
| | | // 如果页面不存在,可以跳转到默认页面 |
| | | uni.showToast({ |
| | | title: '功能正在开发中', |
| | | icon: 'none' |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | delMater(item) { |
| | | if (event && event.target.classList && event.target.classList.contains('link-text')) { |
| | | return; // 如果是链接点击,不执行删除 |
| | | } |
| | | |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除 "' + item.物料名称 + '" 所有扫码记录?删除后将不可恢复!', |
| | |
| | | color: #fff; |
| | | } |
| | | } |
| | | /* 添加链接样式 */ |
| | | .link-text { |
| | | color: #3a78ff; /* 蓝色,类似超链接 */ |
| | | } |
| | | |
| | | .list { |
| | | width: 100%; |
| | |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |