首页 > 其他 > 详细

VUE ant a-modal 传值

时间:2021-05-21 12:18:53      阅读:8      评论:0      收藏:0      [点我收藏+]

---------

<a-modal
    :title="title"
    :width="880"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
  ></a>
    handleOk () {
      const _this = this
      if (this.selectedRowKeys.length === 0) {
        this.$message.error(至少选择一个入库板材)
      } else {
        var objs = this.$refs.table.localDataSource
        var obj = objs.find(item => item.id === this.curExpandedRowKeys[0])

        var slectlist = []
        console.log(this.selectedRowKeys, this.curExpandedRowKeys)
        for (let i = 0; i < this.selectedRowKeys.length; i++) {
          slectlist.push(this.innerData[this.selectedRowKeys[i]])
        }
        obj.slectlist = slectlist
        this.$emit(ok, obj)
        _this.close()
      }
    },

<select-purchase-modal ref="selectModal" @ok="handleOk" />

  

handleOk (e) {
        console.log(e, 12122)
        this.stockInOrder = e
        this.stockInOrder.materialPurchaseOrderCode = e.code
        this.stockInOrder.code = ‘‘
        this.stockInOrder.totalQuantity = 0
        this.orderDetailList = []
         for (const key in this.stockInOrder.details) {
           this.stockInOrder.totalQuantity += key.quantity
           this.orderDetailList.push({
           materialTextureName: key.materialTextureName,
           materialTextureId: key.materialTextureId,
           length: key.realPurchaseLength,
           width: key.realPurchaseWidth,
           thickness: key.thickness,
           quantity: key.quantity,
           materialPurchaseOrderDetailId: key.id,
           marketPrice: key.marketPrice,
           processCost: key.processCost,
           positionName: ‘‘,
           WareHouseName: ‘‘ })
         }
         this.details = this.orderDetailList
        // this.stockInOrder.details
    },

 

VUE ant a-modal 传值

原文:https://www.cnblogs.com/shangdishijiao/p/14792719.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!