|  |  |  | 
|---|
|  |  |  | <view> | 
|---|
|  |  |  | <!-- 搜索框 --> | 
|---|
|  |  |  | <view class="search-bar"> | 
|---|
|  |  |  | <uni-search-bar v-model="condition" placeholder=" 输入批次" bgColor="#EEEEEE"  /> | 
|---|
|  |  |  | <uni-search-bar v-model="condition" placeholder=" 输入批次/编码/单号" bgColor="#EEEEEE"  @confirm="search()"/> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <text class="text-grey ">{{item.asnCode}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="cu-item"> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <text class="text-black">物料条码:</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="action"> | 
|---|
|  |  |  | <text class="text-grey ">{{item.trackCode}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <view class="cu-item"> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <text class="text-black">供应商批次:</text> | 
|---|
|  |  |  | 
|---|
|  |  |  | <text class="text-grey ">{{item.splrBatch}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <!-- <view class="cu-item"> | 
|---|
|  |  |  | <view class="cu-item"> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <text class="text-black">库存批次:</text> | 
|---|
|  |  |  | <text class="text-black">质检状态:</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="action"> | 
|---|
|  |  |  | <text class="text-grey ">{{item.batch}}</text> | 
|---|
|  |  |  | <text class="text-grey ">{{item.isptResult$}}</text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> --> | 
|---|
|  |  |  | <!-- <view class="cu-item"> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <text class="text-black">平台行号: <text class="text-grey ">{{item.platformId}}</text></text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <text class="text-black">质检结果: <text class="text-grey ">{{item.inspect}}</text></text> | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | </view> --> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </view> | 
|---|
|  |  |  | <view class="cu-item"> | 
|---|
|  |  |  | <view class="content"> | 
|---|
|  |  |  | <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text> | 
|---|
|  |  |  | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script> | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | request | 
|---|
|  |  |  | } from '../../common/request.js' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | 
|---|
|  |  |  | selectedList:[], | 
|---|
|  |  |  | repeatClick: false, | 
|---|
|  |  |  | matnrCode:'', | 
|---|
|  |  |  | asnCode:'' | 
|---|
|  |  |  | asnCode:'', | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据 | 
|---|
|  |  |  | eventChannel.on('data', function(data) { | 
|---|
|  |  |  | console.log(data.item) | 
|---|
|  |  |  | that.matList = data.item | 
|---|
|  |  |  | that.getDet(data) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onShow() { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | methods: { | 
|---|
|  |  |  | search(){ | 
|---|
|  |  |  | let req = { | 
|---|
|  |  |  | matnrCode: this.condition, | 
|---|
|  |  |  | asnCode: this.condition, | 
|---|
|  |  |  | code: this.condition, | 
|---|
|  |  |  | batch: this.condition | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.getDet(req); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | back() { | 
|---|
|  |  |  | for (var i = 0; i < this.matList.length; i++) { | 
|---|
|  |  |  | if(this.matList[i].selected === true){ | 
|---|
|  |  |  | 
|---|
|  |  |  | this.matList[index].selected = !this.matList[index].selected | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | async getDet() { | 
|---|
|  |  |  | async getDet(req) { | 
|---|
|  |  |  | let that = this; | 
|---|
|  |  |  | uni.showLoading({ | 
|---|
|  |  |  | title:'加载中...' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | const { | 
|---|
|  |  |  | code, | 
|---|
|  |  |  | data, | 
|---|
|  |  |  | msg | 
|---|
|  |  |  | } = await request('/asnOrderItem/trackCode', { | 
|---|
|  |  |  | matnrCode: that.matnrCode, | 
|---|
|  |  |  | asnCode: that.asnCode | 
|---|
|  |  |  | matnrCode: req.matnrCode, | 
|---|
|  |  |  | asnCode: req.asnCode, | 
|---|
|  |  |  | code: req.code, | 
|---|
|  |  |  | batch: req.batch | 
|---|
|  |  |  | }, "post") | 
|---|
|  |  |  | if (code === 200) { | 
|---|
|  |  |  | for (var i = 0; i < data.length; i++) { | 
|---|
|  |  |  | data[i].receiptQty =0; | 
|---|
|  |  |  | data[i].selected = false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.list = data | 
|---|
|  |  |  | this.matList = data | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | uni.showToast({ | 
|---|
|  |  |  | title: msg, | 
|---|
|  |  |  | 
|---|
|  |  |  | position: 'top' | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | uni.hideLoading(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|