|  |  | 
 |  |  |       <form>
 | 
 |  |  |          <view class="cu-form-group margin-top" v-show="!isconfirm">
 | 
 |  |  |             <view class="title">ASN单号</view>
 | 
 |  |  |             <input placeholder="请扫描ASN单号" v-model="asncode" @input="search" focus></input>
 | 
 |  |  |             <input placeholder="请扫描ASN单号" v-model="asncode" focus></input>
 | 
 |  |  |             <text class='cuIcon-close text-gray margin-right-xs' v-show="asncode!==''" @click="clearCode"></text>
 | 
 |  |  |             <!-- <text class='cuIcon-search text-blue' @click="search"></text> -->
 | 
 |  |  |          </view>
 | 
 |  |  | 
 |  |  |                   <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>
 | 
 |  |  |                </view>
 | 
 |  |  |                <view class="cu-item">
 | 
 |  |  | 						 | 
 |  |  |                   <view class="content" >
 | 
 |  |  | 
 | 
 |  |  |                   <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>
 | 
 |  |  |          <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>
 | 
 |  |  |             <uni-data-select style="min-width: 90%; max-width: 90%;" v-model="whAreaId" :localdata="range"
 | 
 |  |  |                placement="top" @change="selChange"></uni-data-select>
 | 
 |  |  |          </view>
 | 
 |  |  |       </view>
 | 
 |  |  | 
 | 
 |  |  | 
 |  |  |          return {
 | 
 |  |  |             asncode: '',
 | 
 |  |  |             barcode: '',
 | 
 |  |  |             whAreaId: '', | 
 |  |  |             whAreaId: '',
 | 
 |  |  |             list: [],
 | 
 |  |  |             range: [],
 | 
 |  |  |             repeatClick: false,
 | 
 |  |  | 
 |  |  |          }
 | 
 |  |  |       },
 | 
 |  |  |       computed: {
 | 
 |  |  |          ...mapState('user', ['dynamicFields']),		 | 
 |  |  |          ...mapState('user', { | 
 |  |  |             dynFields: state => state.dynamicFields | 
 |  |  |          ...mapState('user', ['dynamicFields']),
 | 
 |  |  |          ...mapState('user', {
 | 
 |  |  |             dynFields: state => state.dynamicFields
 | 
 |  |  |          }),
 | 
 |  |  |          allCount() {
 | 
 |  |  |             return this.list.reduce((acc, row) => +row.receiptQty + acc, 0)
 | 
 |  |  | 
 |  |  | 
 | 
 |  |  |       },
 | 
 |  |  |       mounted() {
 | 
 |  |  |          this.getRece() | 
 |  |  |          this.getRece()
 | 
 |  |  |          this.whAreaId = uni.getStorageSync('whAreaId')
 | 
 |  |  |       },
 | 
 |  |  |       methods: {		 | 
 |  |  |       methods: {
 | 
 |  |  |          async search() {
 | 
 |  |  |             const {
 | 
 |  |  |                code,
 | 
 |  |  | 
 |  |  |          clear() {
 | 
 |  |  |             this.list = []
 | 
 |  |  |             this.barcode = ''
 | 
 |  |  |             this.asncode = ''
 | 
 |  |  |             this.whAreaId = ''
 | 
 |  |  |             this.range = []
 | 
 |  |  |          },
 | 
 |  |  |          next() {
 | 
 |  |  |             if (this.list.length) {
 | 
 |  |  | 
 |  |  |                   icon: "none",
 | 
 |  |  |                   title: '请选择收货区'
 | 
 |  |  |                })
 | 
 |  |  |             } else { | 
 |  |  |                console.log(this.dynFields)	 | 
 |  |  |             } else {
 | 
 |  |  |                console.log(this.dynFields)
 | 
 |  |  |                const newArr = this.list.map(item => {
 | 
 |  |  |                   return {
 | 
 |  |  |                      ...item,
 | 
 |  |  |                      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) | 
 |  |  |                      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);
 | 
 |  |  |                console.log(newArr) | 
 |  |  | 					 | 
 |  |  | 
 | 
 |  |  |                const {
 | 
 |  |  |                   code,
 | 
 |  |  |                   data,
 |