|  |  | 
 |  |  |             <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
 | 
 |  |  |          </view>
 | 
 |  |  |          <view class="cu-form-group" v-show="!isconfirm">
 | 
 |  |  |             <view class="title">物料标签</view>
 | 
 |  |  |             <input placeholder="请扫描物料标签" v-model="barcode"></input>
 | 
 |  |  |             <text class='cuIcon-search text-blue' @click="scrollTo"></text>
 | 
 |  |  |             <view class="title">物料编码</view>
 | 
 |  |  |             <input placeholder="请扫描物料编码" v-model="barcode"></input>
 | 
 |  |  |             <text class='cuIcon-close text-gray margin-right-xs' v-show="barcode!==''" @click="clearBarcode"></text>
 | 
 |  |  |             <text class='cuIcon-search text-blue' @click="search"></text>
 | 
 |  |  |          </view>
 | 
 |  |  | 
 | 
 |  |  |       </form>
 | 
 |  |  | 
 |  |  |                         {{index+1}}
 | 
 |  |  |                      </view>
 | 
 |  |  |                      <view class="text-blue">
 | 
 |  |  |                         {{`${item.maktx}`}}
 | 
 |  |  |                         编码:
 | 
 |  |  |                         {{`${item.matnr}`}}
 | 
 |  |  |                      </view>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="action" v-if="!isconfirm">
 | 
 |  |  | 
 |  |  |                <view class="cu-item">
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">ASN:</text>
 | 
 |  |  |                      <text class="text-grey ">{{item.asnCode}}</text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="action">
 | 
 |  |  |                      <text class="text-grey ">{{item.asnCode}}</text>
 | 
 |  |  | 
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="cu-item">
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">物料名称:</text>
 | 
 |  |  |                      <text class="text-grey ">{{item.maktx}}</text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |                   </view>
 | 
 |  |  |                </view> -->
 | 
 |  |  | 
 | 
 |  |  |                <view class="cu-item">
 | 
 |  |  |                <!-- <view class="cu-item">
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">最大库存: <text class="text-grey ">{{item.maxQty}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">实时库存: <text class="text-grey ">{{item.stockQty}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |                </view> -->
 | 
 |  |  |                <view class="cu-item">
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">平台行号: <text class="text-grey ">{{item.platformId}}</text></text>
 | 
 |  |  |                      <text class="text-black">行号: <text class="text-grey ">{{item.platItemId}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">质检结果: <text class="text-grey ">{{item.inspect}}</text></text>
 | 
 |  |  | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">采购单位:<text class="text-grey ">{{item.purUnit}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |          <!--          <view class="content">
 | 
 |  |  |                      <text class="text-black">库存单位: <text class="text-grey ">{{item.stockUnit}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   </view> -->
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="cu-item">
 | 
 |  |  |                   <view class="content">
 | 
 |  |  | 
 |  |  |                      <view class="cu-form-group padding-lr-0">
 | 
 |  |  |                         <view class="title text-blue"><text
 | 
 |  |  |                               class="text-red text-xl vertical-middle">*</text>收货数量:</view>
 | 
 |  |  |                         <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty" :step='1'></uni-number-box>
 | 
 |  |  |                         <uni-number-box style="width: 70%;" :max="max" v-model="item.receiptQty"
 | 
 |  |  |                            :step='1'></uni-number-box>
 | 
 |  |  |                      </view>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="content" v-else>
 | 
 |  |  | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="cu-item">
 | 
 |  |  |                   <view class="content" v-if="!isconfirm">
 | 
 |  |  |                      <view class="cu-form-group padding-lr-0">
 | 
 |  |  |                         <view class="title text-blue">供应商批次:</view>
 | 
 |  |  |                         <input placeholder="请输入供应商批次" v-model="item.splrBatch"></input>
 | 
 |  |  |                      </view>
 | 
 |  |  |                   </view>
 | 
 |  |  |                   <view class="content" v-else>
 | 
 |  |  |                      <text class="text-black">供应商批次:<text class="text-grey ">{{item.splrBatch}}</text></text>
 | 
 |  |  | 
 | 
 |  |  |                   <view class="content">
 | 
 |  |  |                      <text class="text-black">批次:<text class="text-grey ">{{item.splrBatch}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |                      <text class="text-black">生产日期:<text class="text-grey ">{{item.prodTime}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="cu-item grid  col-1" v-if="!isconfirm">
 | 
 |  |  |                <!-- <view class="cu-item grid  col-1" v-if="!isconfirm">
 | 
 |  |  |                   <view v-for="el in dynamicFields" :key="el.id">
 | 
 |  |  |                      <view class="cu-form-group padding-lr-0">
 | 
 |  |  |                         <view class="title text-blue">{{el.fieldsAlise}}:</view>
 | 
 |  |  |                         <input :placeholder='`请输入${el.fieldsAlise}`' v-model="item[el.fields]"></input>
 | 
 |  |  |                      </view>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="cu-item grid  col-2" v-if="isconfirm">
 | 
 |  |  |                </view> -->
 | 
 |  |  |                <view class="cu-item grid  col-2">
 | 
 |  |  |                   <view class="item" v-for="el in dynamicFields" :key="el.id">
 | 
 |  |  |                      <text class="text-black">{{el.fieldsAlise}}:
 | 
 |  |  |                         <text class="text-grey ">{{item[el.fields]}}</text></text>
 | 
 |  |  |                         <text class="text-grey ">{{item.extendFields[el.fields]}}</text></text>
 | 
 |  |  |                   </view>
 | 
 |  |  |                </view>
 | 
 |  |  |             </view>
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  |       <view class="cu-form-group margin-bottom">
 | 
 |  |  |          <view class="title">收货区</view>
 | 
 |  |  |          <uni-data-select v-model="whAreaId" :localdata="range" placement="top"
 | 
 |  |  |             @change="selChange"></uni-data-select>
 | 
 |  |  |          <view style="width: 80%;">
 | 
 |  |  |             <uni-data-select style="min-width: 90%; max-width: 90%;" v-model="whAreaId" :localdata="range"
 | 
 |  |  |                placement="top" @change="selChange"></uni-data-select>
 | 
 |  |  |          </view>
 | 
 |  |  |       </view>
 | 
 |  |  | 
 | 
 |  |  |       <view class="cu-bar btn-group foot" v-show="!isconfirm">
 | 
 |  |  | 
 |  |  |       </view>
 | 
 |  |  | 
 | 
 |  |  |       <view class="cu-bar btn-group foot" v-show="isconfirm">
 | 
 |  |  |          <button class="cu-btn text-blue line-blue shadow" @click="prev">上一步</button>			 | 
 |  |  |          <button class="cu-btn bg-blue shadow-blur" @click="confirm(false)">收货</button>
 | 
 |  |  |          <button class="cu-btn text-blue line-blue shadow" @click="prev">上一步</button>
 | 
 |  |  |          <button class="cu-btn bg-blue shadow-blur" :disabled="repeatClick" @click="confirm(false)">收货</button>
 | 
 |  |  |       </view>
 | 
 |  |  | 
 | 
 |  |  |    </view>
 | 
 |  |  | 
 |  |  |             whAreaId: '',
 | 
 |  |  |             list: [],
 | 
 |  |  |             range: [],
 | 
 |  |  |             repeatClick: false,
 | 
 |  |  |             isconfirm: false,
 | 
 |  |  |             max: 99999999
 | 
 |  |  |             max: 99999999,
 | 
 |  |  |          }
 | 
 |  |  |       },
 | 
 |  |  |       computed: {
 | 
 |  |  |          ...mapState('user', ['dynamicFields']),
 | 
 |  |  |          ...mapState('user', {
 | 
 |  |  |             dynFields: state => state.dynamicFields
 | 
 |  |  |          }),
 | 
 |  |  |          allCount() {
 | 
 |  |  |             return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
 | 
 |  |  |          }
 | 
 |  |  | 
 |  |  |                data,
 | 
 |  |  |                msg
 | 
 |  |  |             } = await request('/orders/other', {
 | 
 |  |  |                asnCode: this.asncode
 | 
 |  |  |                asnCode: this.asncode,
 | 
 |  |  |                matnrCode: this.barcode
 | 
 |  |  |             })
 | 
 |  |  |             if (code === 200) {
 | 
 |  |  |                this.list = [...data]
 | 
 |  |  | 
 |  |  |          clearCode() {
 | 
 |  |  |             this.asncode = ''
 | 
 |  |  |          },
 | 
 |  |  |          clearBarcode() {
 | 
 |  |  |             this.barcode = ''
 | 
 |  |  |          },
 | 
 |  |  |          scrollTo() {
 | 
 |  |  |             const ref = this.$refs[`${this.barcode}ref`][0];
 | 
 |  |  |             uni.pageScrollTo({
 | 
 |  |  |                scrollTop: ref.$el.offsetTop,
 | 
 |  |  |                duration: 300
 | 
 |  |  |             })
 | 
 |  |  | 
 | 
 |  |  |             // const ref = this.$refs[`${this.barcode}ref`][0];
 | 
 |  |  |             // uni.pageScrollTo({
 | 
 |  |  |             //    scrollTop: ref.$el.offsetTop,
 | 
 |  |  |             //    duration: 300
 | 
 |  |  |             // })
 | 
 |  |  |          },
 | 
 |  |  |          remove(index) {
 | 
 |  |  |             this.list.splice(index, 1);
 | 
 |  |  | 
 |  |  |             this.isconfirm = false
 | 
 |  |  |          },
 | 
 |  |  |          selChange(val) {
 | 
 |  |  |             console.log('-------->')
 | 
 |  |  |             console.log(val)
 | 
 |  |  |             uni.setStorageSync('whAreaId', val)
 | 
 |  |  |          },
 | 
 |  |  |          async complete(id) {
 | 
 |  |  |             this.repeatClick = true
 | 
 |  |  |             const {
 | 
 |  |  |                code,
 | 
 |  |  |                data,
 | 
 |  |  | 
 |  |  |                   icon: "none",
 | 
 |  |  |                })
 | 
 |  |  |             }
 | 
 |  |  |             this.repeatClick = false
 | 
 |  |  |          },
 | 
 |  |  |          async confirm(isCom) {
 | 
 |  |  |             if (this.whAreaId === '') {
 | 
 |  |  | 
 |  |  |                   title: '请选择收货区'
 | 
 |  |  |                })
 | 
 |  |  |             } else {
 | 
 |  |  |                console.log(this.dynFields)
 | 
 |  |  |                const newArr = this.list.map(item => {
 | 
 |  |  |                   return {
 | 
 |  |  |                      ...item,
 | 
 |  |  |                      receiptQty: item.receiptQty === null ? 0 : +item.receiptQty
 | 
 |  |  |                      receiptQty: item.receiptQty === null ? 0 : +item.receiptQty,
 | 
 |  |  |                      // extendFields: this.dynFields.filter(el => el.unique == 1).map(exf => {
 | 
 |  |  |                      //    return {
 | 
 |  |  |                      //       [`${exf.fields}`]: item[exf.fields]
 | 
 |  |  |                      //    }
 | 
 |  |  |                      // }).filter(field => Object.values(field)[0] != undefined)
 | 
 |  |  |                   };
 | 
 |  |  |                }).filter(el => el.receiptQty !== 0);
 | 
 |  |  | 
 | 
 |  |  | 
 | 
 |  |  |                const {
 | 
 |  |  |                   code,
 |